USEC_TO_TIME() converts the value of usec into the TIMESTAMP type. OceanBase Database uses the Coordinated Universal Time (UTC) time zone. Therefore, the database converts the usec value into the TIMESTAMP type based on the UTC time zone.
Syntax
USEC_TO_TIME(usec)
Parameters
| Parameter | Description |
|---|---|
usec |
The value to be converted into the TIMESTAMP type. usec specifies 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