Save date and time to DB flutter

How i can save date and time to flutter to backendless db
My code:

DateTime current = DateTime.now();
Backendless.data.of(‘Table1’).create([{‘viewDatetime’ : current.toString()}]);

Tks!

Hello @Minh_Tuan_Vu

try this one:

DateTime current = DateTime.now();
Backendless.data.of(‘Table1’).create([{‘viewDatetime’ : current.millisecondsSinceEpoch}]);

Regards, Vlad

1 Like

Oh tks @vladimir-upirov