Redshift GETDATE in Snowflake, Databricks and BigQuery
Snowflake and Databricks accept GETDATE() unchanged. BigQuery has no GETDATE; use CURRENT_DATETIME(). Redshift returns the session time zone, UTC by default, so most clusters already run on UTC.
Redshift function: GETDATE() · Redshift docs
Equivalents
| Target | Support | Syntax | Notes | Source |
|---|---|---|---|---|
| Snowflake | Same name | GETDATE() | Alias of CURRENT_TIMESTAMP, returned in the session time zone (TIMEZONE parameter) as TIMESTAMP_LTZ. | Snowflake docs |
| Databricks | Same name | getdate() | Synonym of current_timestamp(), evaluated once at the start of the query. | Databricks docs |
| BigQuery | Rewrite | CURRENT_DATETIME([time_zone]) | DATETIME in UTC unless a time zone is passed. | BigQuery docs |
Behavior differences to check
- Redshift GETDATE returns TIMESTAMP without time zone. Snowflake returns TIMESTAMP_LTZ in the session time zone; if the account default is not UTC, set TIMEZONE = 'UTC' on the session or user to keep the old values.
- TRUNC(GETDATE()) is the Redshift idiom for today; use CURRENT_DATE in all three targets.
Examples
Rows loaded today (UTC)
SELECT * FROM events WHERE loaded_at >= TRUNC(GETDATE());SELECT * FROM events WHERE loaded_at >= CURRENT_DATE;SELECT * FROM events WHERE loaded_at >= current_date();SELECT * FROM events WHERE DATE(loaded_at) = CURRENT_DATE('UTC');