dtunix(X;Y)
Return a 1010 timestamp (date+time) value given an integer, bigint, or floating-point value representing Unix-epoch time. (Available as of version 18.04)
Syntax
dtunix(X;Y)
Input
Argument | Type | Description |
---|---|---|
X |
any numeric type | A scalar value or the name of a column representing Unix-epoch time. |
Y |
text | Options for dtunix(X;Y) are currently ignored. |
The Unix-epoch time is the number of whole seconds since midnight, January 1, 1970 at UTC.
dtunix(X;Y)
can take an integer, bigint, or floating-point value
representing Unix-epoch time and return a date+time value.
Return Value
Returns a signed float value in the form XXXX.YYYYYYYYYYY, that can be
expressed in a date+time format (such as
type:datehms24
).
The date+time format uses 1/1/2035 as the epoch (or reference) point. Specifically, the value XXXX.YYYYYYYYYYY is a signed float representing the number of days before or after the epoch. This value is typically negative, because the date+time is usually before the epoch. For more information about date formats, see Dates and time.
Example
The following example converts a Unix-epoch time to the date format
datehms24
.
<table cols="unix_epoch">
1607554906
1609556010
1630605577
</table>
<willbe name="date_time_converted" value="dtunix(unix_epoch;)" format="type:datehms24"/>