This is a discussion on Adding 10 hours to specific time within the MySQL forums, part of the Database Server Software category; --> Hi everyone! Just wondering: How would one add 10 hours to a specific time? Is there something similar to ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| ||||
| 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 help: 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 |