Adds a time interval to a TIME value. Useful for work-hour calculations and scheduling.
TIMEDiperbarui: 13 Jun 2026TIME_ADD(time_expression, INTERVAL int64_expression time_part)The starting TIME value
The number of intervals to add
Interval unit: HOUR, MINUTE, SECOND, MILLISECOND, MICROSECOND
1 SELECT 2 TIME '09:00:00' as start_time, 3 TIME_ADD(TIME '09:00:00', INTERVAL 8 HOUR) as end_time, 4 TIME_ADD(TIME '09:00:00', INTERVAL 30 MINUTE) as break_time;
Add hours and minutes to a time value.
| start_time | end_time | break_time |
|---|---|---|
| 09:00:00 | 17:00:00 | 09:30:00 |
1 SELECT 2 TIME '23:00:00' as late_night, 3 TIME_ADD(TIME '23:00:00', INTERVAL 3 HOUR) as past_midnight;
The result wraps around to the next day.
| late_night | past_midnight |
|---|---|
| 23:00:00 | 02:00:00 |
Sudah paham TIME_ADD? Latih langsung di browser
Latihan interaktif, langsung di browser.