BigQuery · Timestamp function
BigQuery CURRENT_TIMESTAMP
CURRENT_TIMESTAMP() returns the current instant as a TIMESTAMP with microsecond precision, shown in UTC. Use it for load times, freshness checks and "last N hours" filters; it takes no time zone argument.
CURRENT_TIMESTAMP returns now as an absolute point in time. A TIMESTAMP has no zone of its own; the console and CAST(... AS STRING) display it in UTC. To see the local wall-clock time, wrap it: DATETIME(CURRENT_TIMESTAMP(), 'America/Denver') or FORMAT_TIMESTAMP('%F %T', CURRENT_TIMESTAMP(), 'America/Denver').
The value is set when the statement starts, so every call in one query returns the same instant, and the parentheses are optional. Leap seconds are smeared, so the clock never repeats or skips a second.
Typical uses: stamping rows with loaded_at in INSERT or MERGE, freshness checks with TIMESTAMP_DIFF(CURRENT_TIMESTAMP(), MAX(loaded_at), MINUTE), and rolling windows such as event_ts >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 24 HOUR).
Syntax
CURRENT_TIMESTAMP()
CURRENT_TIMESTAMPReturn value
TIMESTAMP
Examples
Now in UTC and as local wall-clock time
Output depends on when you run it, for example 2026-11-23 14:05:12.345678 UTC in the first column.
SELECT
CURRENT_TIMESTAMP() AS now_utc,
DATETIME(CURRENT_TIMESTAMP(), 'Europe/Berlin') AS now_berlin,
FORMAT_TIMESTAMP('%F %H:%M %Z', CURRENT_TIMESTAMP(), 'America/New_York') AS now_new_york_text;Data freshness check
All CURRENT_TIMESTAMP() calls in the statement return the same instant, so the differences are exact.
WITH loads AS (
SELECT 'orders' AS table_name, TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 20 MINUTE) AS loaded_at UNION ALL
SELECT 'orders', TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 3 HOUR) UNION ALL
SELECT 'payments', TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 HOUR)
)
SELECT
table_name,
TIMESTAMP_DIFF(CURRENT_TIMESTAMP(), MAX(loaded_at), MINUTE) AS minutes_since_load,
TIMESTAMP_DIFF(CURRENT_TIMESTAMP(), MAX(loaded_at), HOUR) >= 6 AS is_stale
FROM loads
GROUP BY table_name
ORDER BY table_name;| table_name | minutes_since_load | is_stale |
|---|---|---|
| orders | 20 | false |
| payments | 420 | true |
Events from the last 24 hours
WITH events AS (
SELECT 'e1' AS event_id, TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 2 HOUR) AS event_ts UNION ALL
SELECT 'e2', TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 HOUR)
)
SELECT COUNT(*) AS last_24h
FROM events
WHERE event_ts >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 24 HOUR);| last_24h |
|---|
| 1 |
Common mistakes
- Passing a time zone.
CURRENT_TIMESTAMP('Europe/Berlin')is an error: an instant has no zone. UseCURRENT_DATETIME('Europe/Berlin')or convert with DATETIME. - Using
NOW(),GETDATE()orSYSDATE. They don't exist in BigQuery. - Comparing with a DATE column.
order_date >= CURRENT_TIMESTAMP()mixes types; compare withCURRENT_DATE()or convert the column. - Expecting different values for different rows. Every call in one statement returns the same instant, so it can't be used to measure time spent inside a query.
Cost and performance
- Queries that call CURRENT_TIMESTAMP() are never served from the query cache, so a dashboard tile that refreshes often is billed each time on on-demand pricing; see BigQuery pricing. A filter such as
ts >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 DAY)is a constant expression and still prunes partitions. - To see what scheduled freshness checks and dashboards cost over time, group your job history by day, as in daily cost trend.
FAQ
How do I get the current timestamp in BigQuery?
CURRENT_TIMESTAMP(). It returns a TIMESTAMP shown in UTC, with microsecond precision.
How do I get the current time in a specific time zone?
DATETIME(CURRENT_TIMESTAMP(), 'Asia/Tokyo') or simply CURRENT_DATETIME('Asia/Tokyo'). Both return a DATETIME with the local wall-clock time.
Is CURRENT_TIMESTAMP the same for every row?
Yes. It is evaluated once at the start of the statement.
Related
Errors you may hit
More timestamp functions
All BigQuery timestamp functions · All functions · BigQuery error messages
