I have a time field in my database, it has a value of 22:05
I want to subtract 5 minutes. When the field is datetime, I use sub_date and it works fine, but I cannot get it using the time field. I get a warning that I donโt know about
mysql> SELECT scheduleFinalTime FROM clientSchedule WHERE clientScheduleID = 3; +-------------------+ | scheduleFinalTime | +-------------------+ | 22:05:00 | +-------------------+ 1 row in set (0.00 sec) mysql> SELECT date_sub(scheduleFinalTime, INTERVAL 5 MINUTE) FROM clientSchedule WHERE clientScheduleID = 3; +------------------------------------------------+ | date_sub(scheduleFinalTime, INTERVAL 5 MINUTE) | +------------------------------------------------+ | NULL | +------------------------------------------------+ 1 row in set, 1 warning (0.00 sec) mysql> show warnings; +---------+------+------------------------------------------------------------+ | Level | Code | Message | +---------+------+------------------------------------------------------------+ | Warning | 1264 | Out of range value for column 'scheduleFinalTime' at row 1 | +---------+------+------------------------------------------------------------+ 1 row in set (0.00 sec)
Thank you in advance
source share