Hi All
I want the time difference from current date time
For eg. From current date time i want to subtract 10 hrs and after subtracting i want the resultant in date time in MySql
Hi All
I want the time difference from current date time
For eg. From current date time i want to subtract 10 hrs and after subtracting i want the resultant in date time in MySql
mysql> select now(), DATE_ADD(now(), interval -10 hour);
+---------------------+------------------------------------+
| now() | DATE_ADD(now(), interval -10 hour) |
+---------------------+------------------------------------+
| 2012-04-07 13:13:41 | 2012-04-07 03:13:41 |
+---------------------+------------------------------------+
1 row in set (0.00 sec)
See the manual for more.