Answers for "flutter convert timestamp to datetime"

5

flutter date time to timestamp

DateTime currentPhoneDate = DateTime.now(); //DateTime

Timestamp myTimeStamp = Timestamp.fromDate(currentPhoneDate); //To TimeStamp

DateTime myDateTime = myTimeStamp.toDate(); // TimeStamp to DateTime

print("current phone data is: $currentPhoneDate");
print("current phone data is: $myDateTime");
Posted by: Guest on June-22-2020
2

how to convert timestamp to datetime in dart

Timestamp time; //from firebase
DateTime.fromMicrosecondsSinceEpoch(time.microsecondsSinceEpoch)
Posted by: Guest on November-05-2020

Code answers related to "flutter convert timestamp to datetime"

Code answers related to "Dart"

Browse Popular Code Answers by Language