My timestamp returns Timestamp(seconds=1560523991, nanoseconds=286000000) in a Flutter Firestore snapshot.
Timestamp(seconds=1560523991, nanoseconds=286000000)
I want to print it as properly formatted date and
Here is way!
Firestore will return TimeStamp like Timestamp(seconds=1560523991, nanoseconds=286000000).
This can be parsed as
Timestamp t = document['timeFieldName']; DateTime d = t.toDate(); print(d.toString()); //2019-12-28 18:48:48.364