My timestamp returns Timestamp(seconds=1560523991, nanoseconds=286000000)
in a Flutter Firestore snapshot.
I want to print it as properly formatted date and
First visit here for intl package, then paste the package into your pubspec.yaml, run pub get (the usual way of updating pubspec).Import the package into your dart file and try out the below method.
String timestamp;
DateTime now = DateTime.now();
String formatDate =
DateFormat('yyyy-MM-dd – kk:mm').format(now);
timestamp = formatDate;