BigQuery · Datetime function
BigQuery CURRENT_DATETIME
CURRENT_DATETIME() returns the current date and time as a DATETIME, the wall-clock time in UTC or in the time zone you pass: CURRENT_DATETIME('Europe/Berlin'). Use it for local business times; use CURRENT_TIMESTAMP for event times.
CURRENT_DATETIME returns what a clock on the wall shows right now, as a DATETIME with microsecond precision and no time zone attached. Without an argument the clock is UTC; with CURRENT_DATETIME('America/Chicago') it is Chicago local time, including daylight saving time.
Because a DATETIME doesn't record which zone it came from, CURRENT_DATETIME('Asia/Tokyo') and CURRENT_DATETIME() produce values that look nine hours apart but carry no zone information. That is fine for local scheduling logic ("is the store open now", "orders placed before 14:00 local ship today") and wrong for storing event times; store those as TIMESTAMP with CURRENT_TIMESTAMP.
Like the other CURRENT_ functions, the value is fixed when the statement starts and the parentheses are optional without an argument.
Syntax
CURRENT_DATETIME([time_zone])
CURRENT_DATETIMEArguments and return value
| Argument | Description |
|---|---|
time_zone | Optional STRING: a time zone name such as 'Europe/London' or an offset such as '+05:30'. Defaults to UTC. |
Returns: DATETIME
Examples
Wall-clock time in UTC and in local zones
The output depends on when you run it. All three columns are DATETIME values, such as 2026-11-23T14:05:12.345678, without a zone.
SELECT
CURRENT_DATETIME() AS utc_now,
CURRENT_DATETIME('America/New_York') AS new_york_now,
CURRENT_DATETIME('Asia/Kolkata') AS kolkata_now;Is the support desk open right now?
DAYOFWEEK 2 to 6 is Monday to Friday. The check follows Berlin local time across daylight saving changes.
SELECT
EXTRACT(HOUR FROM CURRENT_DATETIME('Europe/Berlin')) BETWEEN 9 AND 17
AND EXTRACT(DAYOFWEEK FROM CURRENT_DATETIME('Europe/Berlin')) BETWEEN 2 AND 6 AS desk_open;Same-day shipping cutoff in local time
TIME() takes the time of day from a DATETIME; the result depends on when you run the query.
WITH orders AS (
SELECT 'o1' AS order_id, DATETIME_SUB(CURRENT_DATETIME('America/Chicago'), INTERVAL 30 MINUTE) AS placed_local
)
SELECT
order_id,
TIME(placed_local) < TIME '14:00:00' AS ships_today
FROM orders;Common mistakes
- Storing CURRENT_DATETIME() as an event time. Once saved, nobody can tell which zone it was in, and DST makes some local times ambiguous. Store
CURRENT_TIMESTAMP()and convert for display. - Comparing CURRENT_DATETIME() with a TIMESTAMP column. The types differ; convert one side, for example
TIMESTAMP(CURRENT_DATETIME('Europe/Paris'), 'Europe/Paris'), or simply use CURRENT_TIMESTAMP(). - Porting
NOW(),GETDATE()orSYSDATETIME(). None exist in BigQuery; CURRENT_DATETIME is the closest match for a local, zone-less value.
Cost and performance
- Queries that call CURRENT_DATETIME() are never answered from the query cache, so every run is billed again on on-demand pricing. See BigQuery pricing.
FAQ
What is the difference between CURRENT_DATETIME and CURRENT_TIMESTAMP?
CURRENT_DATETIME returns a local wall-clock DATETIME without a zone. CURRENT_TIMESTAMP returns an absolute TIMESTAMP, which the console shows in UTC.
How do I get the current time in my time zone in BigQuery?
CURRENT_DATETIME('America/Los_Angeles') returns the local date and time. CURRENT_TIME('America/Los_Angeles') returns only the time of day.
Does CURRENT_DATETIME handle daylight saving time?
Yes, when you pass a zone name such as 'Europe/Berlin'. A fixed offset such as '+01' never changes with DST.
Related
More datetime functions
All BigQuery datetime functions · All functions · BigQuery error messages
