Skip to main content
Version: V1.0.0

USEC_TO_TIME

The USEC_TO_TIME function converts a number of microseconds (usec) to a value of the TIMESTAMP type. The timezone used by seekdb is UTC (Coordinated Universal Time). Therefore, when converting a number of microseconds to a TIMESTAMP value, the system considers the timezone information. If no timezone information is specified, the calculation is performed in the UTC timezone.

Function syntax

USEC_TO_TIME(usec)

Parameters

ParameterDescription
usecThe number of microseconds to be converted to a TIMESTAMP value. usec represents the number of microseconds since 1970-01-01 00:00:00.000000.

Examples

SELECT USEC_TO_TIME(1);
+----------------------------+
| USEC_TO_TIME(1) |
+----------------------------+
| 1970-01-01 08:00:00.000001 |
+----------------------------+
1 row in set (0.001 sec)