|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi everyone!
Just wondering: How would one add 10 hours to a specific time? Is there something similar to add an interval's to a specific time? SELECT TIMESTAMPADD(HOUR, 10, '12:00:00'); Results with me: +------------------------------------+ | TIMESTAMPADD(HOUR, 10, '12:00:00') | +------------------------------------+ | NULL | +------------------------------------+ 1 row in set, 1 warning (0.00 sec) Warning: Truncated incorrect datetime value: '12:00:00' Kind regards, Marijn |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Hi,
> Just wondering: > > How would one add 10 hours to a specific time? Is there something > similar to add an interval's to a specific time? > > SELECT TIMESTAMPADD(HOUR, 10, '12:00:00'); > > Results with me: > > +------------------------------------+ > | TIMESTAMPADD(HOUR, 10, '12:00:00') | > +------------------------------------+ > | NULL | > +------------------------------------+ > 1 row in set, 1 warning (0.00 sec) > > > Warning: > > Truncated incorrect datetime value: '12:00:00' This should : http://dev.mysql.com/doc/refman/5.0/...functions.html select addtime(current_time, '10:00:00'), current_time -- Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle & MS SQL Server Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.com |
|
![]() |
| Outils de la discussion | |
|
|