Date arithmetic also can be performed using INTERVAL together with the + or - operator : INTERVAL : Date Time Functions MySQL TUTORIALS


MySQL TUTORIALS » Date Time Functions » INTERVAL »

 

Date arithmetic also can be performed using INTERVAL together with the + or - operator


date + INTERVAL expr unit
date - INTERVAL expr unit


mysql>
mysql> SELECT '1997-12-31 23:59:59' + INTERVAL SECOND;
+-------------------------------------------+
'1997-12-31 23:59:59' + INTERVAL SECOND |
+-------------------------------------------+
1998-01-01 00:00:00                       |
+-------------------------------------------+
row in set (0.00 sec)



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo Date Time Functions
» INTERVAL