Jump to: navigation, search

Mysql MICROSECOND

From w3cyberlearnings

Contents

MySQL MICROSECOND Function

This function returns microsecond from the time or datetime expression

Syntax MICROSECOND

  • expre: datetime or time expression
MICROSECOND(expre);

Example 1

mysql> SELECT MICROSECOND('12:00:00.3002');
+------------------------------+
| MICROSECOND('12:00:00.3002') |
+------------------------------+
|                       300200 |
+------------------------------+
1 row in set (0.00 sec)


Example 2

mysql> SELECT MICROSECOND('2012-05-22 12:00:00.13002');
+------------------------------------------+
| MICROSECOND('2012-05-22 12:00:00.13002') |
+------------------------------------------+
|                                   130020 |
+------------------------------------------+
1 row in set (0.00 sec)

Related Links



Navigation
Web
SQL
MISC
References