Friday 5 August 2016

TIME_TO_SEC: Convert time to seconds


mysql> SELECT TIME_TO_SEC("10:23:43");
+-------------------------+
| TIME_TO_SEC("10:23:43") |
+-------------------------+
|                   37423 |
+-------------------------+
1 row in set (0.00 sec)

mysql> SELECT TIME_TO_SEC("23:59:59");
+-------------------------+
| TIME_TO_SEC("23:59:59") |
+-------------------------+
|                   86399 |
+-------------------------+
1 row in set (0.00 sec)

mysql> SELECT TIME_TO_SEC("24:00:00");
+-------------------------+
| TIME_TO_SEC("24:00:00") |
+-------------------------+
|                   86400 |
+-------------------------+
1 row in set (0.00 sec)







Previous                                                 Next                                                 Home

No comments:

Post a Comment