TIME_TO_USEC

2024-03-05 01:54:27  Updated

Syntax

TIME_TO_USEC(date)

Purpose

TIME_TO_USEC() converts the value of date into microseconds from 1970-01-01 00:00:00.000000, taking into account the time zone.

In the syntax above, date can be a date or a datetime.

Examples

obclient> SELECT TIME_TO_USEC('2014-03-25'), TIME_TO_USEC(NOW());
+----------------------------+---------------------+
| TIME_TO_USEC('2014-03-25') | TIME_TO_USEC(NOW()) |
+----------------------------+---------------------+
|           1395676800000000 |    1525528100000000 |
+----------------------------+---------------------+
1 row in set

Contact Us