How to convert flutter TimeOfDay to DateTime?

This is not possible.
TimeOfDay holds only the hour and minute. While a DateTime also has day/month/year

If you want to convert it, you will need more information. Such as the current DateTime. And then merge the two into one final datetime.

TimeOfDay t;
final now = new DateTime.now();
return new DateTime(now.year, now.month, now.day, t.hour, t.minute);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)