Say I have a string
"1974-03-20 00:00:00.000"
It is created using DateTime.now(), how do I convert the string back to a DateTime object?
DateTime.now()
DateTime
DateTime has a parse method
parse
var parsedDate = DateTime.parse('1974-03-20 00:00:00.000');
https://api.dartlang.org/stable/dart-core/DateTime/parse.html
2.1m questions
2.1m answers
60 comments
57.0k users