Determine the differences between dates and times: DATEDIFF(, ) : DATEDIFF « Date Time « SQL / MySQL






Determine the differences between dates and times: DATEDIFF(, )

    
mysql>
mysql>
mysql>
mysql> SELECT DATEDIFF('2004-12-31 23:59:59', '2003-12-31 23:59:59');
+--------------------------------------------------------+
| DATEDIFF('2004-12-31 23:59:59', '2003-12-31 23:59:59') |
+--------------------------------------------------------+
|                                                    366 |
+--------------------------------------------------------+
1 row in set (0.00 sec)

   
    
    
    
  








Related examples in the same category

1.Check date difference