Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Date time format : what is the format called?

Want to know what type of Date format is this : 2022-08-12T01:47:24.856316 , 2022-09-15T08:32:38.490Z
And how do i implement the current time to this format.

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

The format is known as ISO 8601, and you can parse and format it like this:

void main() {
  print(DateTime.parse('2022-08-12T01:47:24.856316'));
  print(DateTime.parse('2022-09-15T08:32:38.490Z'));
  print(DateTime.now().toUtc().toIso8601String());
}

Output:

2022-08-12 01:47:24.856
2022-09-15 08:32:38.490Z
2023-01-28T07:28:29.865Z
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading