from_unixtime
The from_unixtime function is used to convert a timestamp represented by a numeric UNIX value into a date value.
Syntax
from_unixtime(bigint unixtime)
Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| unixtime | Yes | BIGINT | A timestamp in UNIX format. Represents the timestamp to be converted. The parameter should be filled with the first ten digits of a normal UNIX format timestamp. |
Return Values
Converts the timestamp to a time format and returns a date value of type STRING, in the format yyyy-MM-dd HH:mm:ss, yyyyMMddHHmmss.uuuuuu, or yyyyMMdd.
If the unixtime value is NULL, NULL is returned.
Example Code
- Example 1
select from_unixtime(1692149997);
Returns 2023-08-16 09:39:57.
- Example 2
select from_unixtime(NULL);
Returns NULL.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot