dart timestamp
void main() {
print(new DateTime.now().millisecondsSinceEpoch);
}
dart timestamp
void main() {
print(new DateTime.now().millisecondsSinceEpoch);
}
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");
how to convert timestamp to datetime in dart
Timestamp time; //from firebase
DateTime.fromMicrosecondsSinceEpoch(time.microsecondsSinceEpoch)
flutter timestamp to datetime
Timestamp t = document['timeFieldName'];
DateTime d = t.toDate();
print(d.toString()); //2019-12-28 18:48:48.364
flutter timestamp to datetime
Map<String, dynamic> map = docSnapshot.data()!;
DateTime dt = (map['timestamp'] as Timestamp).toDate();
convert datetime to TZDateTimeflutter
var time = tz.TZDateTime.from(
scheduledNotificationDateTime,
tz.local,
);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us