This section contains reference documentation for the TIMECONVERT function.
select id,
created_at_timestamp,
cast(created_at_timestamp AS long) AS timeInMs,
TIMECONVERT(created_at_timestamp, 'MILLISECONDS', 'DAYS') AS convertedTime
from githubEvents
LIMIT 1select id,
created_at_timestamp,
cast(created_at_timestamp AS long) AS timeInMs,
TIMECONVERT(created_at_timestamp, 'MILLISECONDS', 'HOURS') AS convertedTime
from githubEvents
LIMIT 1select id,
created_at_timestamp,
cast(created_at_timestamp AS long) AS timeInMs,
TIMECONVERT(created_at_timestamp, 'MILLISECONDS', 'SECONDS') AS convertedTime
from githubEvents
LIMIT 1select id,
created_at_timestamp,
cast(created_at_timestamp AS long) AS timeInMs,
TIMECONVERT(created_at_timestamp, 'MILLISECONDS', 'MILLISECONDS') AS convertedTime
from githubEvents
LIMIT 1select id,
created_at_timestamp,
cast(created_at_timestamp AS long) AS timeInMs,
TIMECONVERT(created_at_timestamp, 'MILLISECONDS', 'MICROSECONDS') AS convertedTime
from githubEvents
LIMIT 1select id,
created_at_timestamp,
cast(created_at_timestamp AS long) AS timeInMs,
TIMECONVERT(created_at_timestamp, 'MILLISECONDS', 'NANOSECONDS') AS convertedTime
from githubEvents
LIMIT 1