Reputation: 25
I want to send date to firestore timestamp field.I don't want to use timestamp.now(). The date should be the user selected date. eg in firestore it should look like
dob: June 4, 1946 at 12:00:00 AM UTC+5:30
Upvotes: 1
Views: 121
Reputation: 2087
You can exploit the toIso8601String method (docs) contained in the DateTime class. Firebase loves that standard.
toIso8601String
DateTime