The USEC_TO_TIME function is used to convert microseconds (usec) to a value of the TIMESTAMP type. OceanBase AI Database uses the UTC (Coordinated Universal Time) time zone. Therefore, when converting microseconds to TIMESTAMP, the system takes into account the time zone information and uses UTC as the standard.
Syntax
USEC_TO_TIME(usec)
Parameters
Parameter |
Description |
|---|---|
usec |
The value to be converted into a TIMESTAMP value. usec indicates the number of microseconds from 1970-01-01 00:00:00.000000. |
Examples
obclient> SELECT USEC_TO_TIME(1);
+----------------------------+
| USEC_TO_TIME(1) |
+----------------------------+
| 1970-01-01 08:00:00.000001 |
+----------------------------+
1 row in set