Skip to content

bigfunctions > timestamp_from_unix_date_time

timestamp_from_unix_date_time

Signature

timestamp_from_unix_date_time(unix_date_time, date_time_part)

Description

Interprets unix_date_time as the number of date_time_part since 1970-01-01 00:00:00 UTC. Truncates higher levels of precision by rounding down to the beginning of the date_time_part.

Param Possible values
date_time_part MICROSECOND, MILLISECOND, SECOND, MINUTE, HOUR, DAY, WEEK, WEEK(MONDAY), WEEK(TUESDAY), WEEK(WEDNESDAY), WEEK(THURSDAY), WEEK(FRIDAY), WEEK(SATURDAY), WEEK(SUNDAY), MONTH, QUARTER, YEAR

Examples

select bigfunctions.eu.timestamp_from_unix_date_time(31, "YEAR")
select bigfunctions.us.timestamp_from_unix_date_time(31, "YEAR")
select bigfunctions.europe_west1.timestamp_from_unix_date_time(31, "YEAR")
+-------------------------+
| from_unix               |
+-------------------------+
| 2001-01-01 00:00:00 UTC |
+-------------------------+