title: How do i format date like this 2019-07-08T10:37:28Z in flutter
body: <p>I want to format the date like this <code>2019-07-08T10:37:28Z</code> but I don't know how to do it can anyone help me with this.</p>
  
  <p>Here is the code for date picker</p>
  
  <pre><code>final format = new DateFormat.yMMMEd('en-US');
  
  return DateTimeField(
        format: format,
        autocorrect: true,
        autovalidate: false,
        controller: _bspLicenseExpiryDate,
        readOnly: true,
        validator: (date) =&gt; date == null ? 'Please enter valid date' : null,
        decoration: InputDecoration(
            labelText: "Expiry Date",
            hintText: "Expiry Date",
            prefixIcon: Icon(
              FontAwesomeIcons.calendar,
              size: 24,
            )),
        onShowPicker: (context, currentValue) {
          return showDatePicker(
            context: context,
            firstDate: DateTime.now(),
            initialDate: currentValue ?? DateTime.now(),
            lastDate: DateTime(2100),
          );
        },
      );
  </code></pre>