Reputation: 724
I have a date in YYYY-MM-DD
format and want to convert this in UNIX time in snowflake.
Function does this is MySQL:
UNIX_TIMESTAMP('1999-01-22')
MySQL output 916988400
How can I achieve the same in snowflake?
Upvotes: 1
Views: 2434
Reputation: 11046
You can use the date_part function with epoch_second for the part:
select date_part(epoch_second, '1999-01-22'::timestamp);
Upvotes: 3