This example illustrates how you can use functions to manipulate Unix time values in a column of Datetime type.
UNIXTIME
- Returns the Unix time value computed from a Datetime value. See UNIXTIME Function.-
UNIXTIMEFORMAT
- Formats a Unix time value in the specified manner. See UNIXTIMEFORMAT Function.
Source:
date |
---|
2/8/16 15:41 |
12/30/15 0:00 |
4/26/15 7:07 |
Transform:
Use the following to generate a column containing the above values as Unix timecode values:
derive type:single value: UNIXTIME (date)
Results:
NOTE: If the source Datetime value does not contain a valid input for one of these functions, no value is returned.
date | unixtime_date |
---|---|
2/8/16 15:41 | 1454946120000 |
12/30/15 0:00 | 1451433600000 |
4/26/15 7:07 | 1430032020000 |
This page has no comments.