unytics/bigfunctions

[new]: `timestamp_to_unix_date_time(timestamp_expression TIMESTAMP, date_time_part STRING)`

AxelThevenot opened this issue · 1 comments

Check the idea has not already been suggested

Edit the title above with self-explanatory function name and argument names

  • The function name and the argument names I entered in the title above seems self explanatory to me.

BigFunction Description as it would appear in the documentation

Returns 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.

Examples of (arguments, expected output) as they would appear in the documentation

select bigfunctions.us.timestamp_to_unix_date_time(timestamp("2001-01-01"), "YEAR") as unix_year

+------------+
|  unix_year |
+------------+
|  31        |
+------------+