TIMECONVERT
This section contains reference documentation for the TIMECONVERT function.
Last updated
Was this helpful?
This section contains reference documentation for the TIMECONVERT function.
Last updated
Was this helpful?
Converts the value from a column that contains an epoch timestamp into another time unit. The converted value will be rounded down.
TIMECONVERT(col, fromUnit, toUnit)
The supported units are as follows:
DAYS
HOURS
MINUTES
SECONDS
MILLISECONDS
MICROSECONDS
NANOSECONDS
These examples are based on the .
7044874109
2018-01-01 11:00:00.0
1514804400000
17532
7044874109
2018-01-01 11:00:00.0
1514804400000
420779
7044874109
2018-01-01 11:00:00.0
1514804400000
1514804400
7044874109
2018-01-01 11:00:00.0
1514804400000
1514804400000
7044874109
2018-01-01 11:00:00.0
1514804400000
1514804400000000
7044874109
2018-01-01 11:00:00.0
1514804400000
1514804400000000000