Tuesday, 27 November 2012

MySQL - Add seconds to datetime

Hi Guys,
Here is my first blog about Tech Talks.

MySQL
When I like to add 10 seconds to n existing datetine field inside a table, i couldnot made it. I tried several Methods and functions like ADDDATE(),DATE_ADD(),DATEADD(),TIME,etc. After spending an hour I got it.Here it goes!

Select DATE_ADD('date-with-time-goes-here', INTERVAL '00.10' MINUTE_SECOND)

I made it.

No comments:

Post a Comment