The function converts a Unix timestamp (in seconds) into a DATETIME value.
FROM_SECOND(<unix_timestamp>)
| Parameter | Description |
|---|---|
<unix_timestamp> | Required. The Unix timestamp representing the number of seconds elapsed since 1970-01-01 00:00:00 UTC. |
<unix_timestamp> is NULL, the function returns NULL.<unix_timestamp> is out of valid range, the function returns an error.SELECT FROM_SECOND(1700000000);
+-------------------------+ | from_second(1700000000) | +-------------------------+ | 2023-11-15 06:13:20 | +-------------------------+