Muezz
04/07/2022, 5:36 PMVinzent
04/07/2022, 5:39 PMMuezz
04/07/2022, 5:40 PMVinzent
04/07/2022, 5:41 PMtimestampMuezz
04/07/2022, 5:44 PMDatetime.now().toIso8601String()?Vinzent
04/07/2022, 5:56 PMDanMossa
04/07/2022, 5:59 PMMuezz
04/07/2022, 7:03 PMMuezz
04/07/2022, 7:38 PMdate -> Calendar date(year, month, date)=>
Try #1: DateTime.now().millisecondsSinceEpoch on Flutter's end. This did not insert the row into the table as this column field did not fit the schema.
Try #2: DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day,), on Flutter's end. My assumption was that Flutter's object DateTime technically contains time as well while supabase's date does not. May that is the reason both do not match. But during this try, I noticed that Flutter still added zeros for time even if I didnt specify the time.
Try #3 & #4: DateFormat('yyyy,mm,dd').format(DateTime.now()) and DateTime.now().toIso8601String() on Flutter's end. Both return a String instead of an instance of Datetime. Upon inserting this, Supabase for some reason automatically converts the string to a date. Therefore, I think this is the solution.
If anybody knows, please correct me but I think that there is no DIRECT equivalent of Supabase's date in Flutter/Dart. For now, this String to date method works.Muezz
04/07/2022, 7:39 PMDateTime then you must be using a TimeStamp in Supabase. Thats the only way they match.