to_timestamp
Converts UINT256 seconds since the Unix epoch to a timezone-naive TIMESTAMP. Interpret the result as UTC when the source value is an EVM block timestamp.
Example
Runs locally
{"id":"sample_54pjvm","title":"Sample"}
API reference
to_timestamp(UINT256) #
Converts unsigned Unix seconds to TIMESTAMP. Values above INT64_MAX return NULL; values within INT64 that exceed the supported TIMESTAMP conversion range can raise a Conversion Error.
Inputs
| Name | Type | Use |
|---|---|---|
unix_seconds | UINT256 UINT256 whole seconds since 1970-01-01 00:00:00. NULL returns NULL. | required positional |
Returns
| Name | Type |
|---|---|
timestamp | TIMESTAMP |
SQL timestamp. Returns a timezone-naive TIMESTAMP. Values above INT64_MAX return NULL; other out-of-range conversions may throw.
Examples
Runs locally
{"id":"sample_o1ub5z","title":"Sample"}