Friday 5 August 2016

TIMEDIFF() : Get difference between two date times



TIMEDIFF() returns the differences between two time or datetime expressions.

mysql> SELECT TIMEDIFF('2016-05-18 15:45:57.005678','2016-05-18 13:40:50.005670');
+---------------------------------------------------------------------+
| TIMEDIFF('2016-05-18 15:45:57.005678','2016-05-18 13:40:50.005670') |
+---------------------------------------------------------------------+
| 02:05:07.000008                                                     |
+---------------------------------------------------------------------+
1 row in set (0.00 sec) 







Previous                                                 Next                                                 Home

No comments:

Post a Comment