Google Bigquery Subtract hours from date

To Subtract an hour from a DATETIME column:

\n\n
SELECT \n  DATETIME_SUB(CURRENT_DATETIME(), INTERVAL 1 HOUR)\n
\n\n

For TIMESTAMP Columns:

\n\n
SELECT \n  TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 HOUR)      \n

dan-irving

posted on

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds