Jump to: navigation, search

Mysql SECOND

From w3cyberlearnings

Contents

MySQL SECOND Function

This function returns second from time or datetime expression.

Syntax SECOND

  • expre: time or datetime expression.
SECOND(expre);

Example 1

mysql> SELECT SECOND('2:04:50');
+-------------------+
| SECOND('2:04:50') |
+-------------------+
|                50 |
+-------------------+
1 row in set (0.00 sec)

Example 2

mysql> SELECT SECOND('2012-04-14 2:04:50');
+------------------------------+
| SECOND('2012-04-14 2:04:50') |
+------------------------------+
|                           50 |
+------------------------------+
1 row in set (0.00 sec)

Related Links



Navigation
Web
SQL
MISC
References