Reputation: 1095
In BigQuery Legacy Sql, we use timestamp_to_sec() function to convert timestamp to seconds. What is its equivalent in BigQuery Standard SQL?
Upvotes: 9
Views: 17451
Reputation: 173190
BigQuery Legacy SQL
SELECT TIMESTAMP_TO_SEC(CURRENT_TIMESTAMP())
BigQuery Standard SQL
SELECT UNIX_SECONDS(CURRENT_TIMESTAMP())
Upvotes: 17