Search code examples
google-bigquerytimestamp-with-timezone

BigQuery Google timezone conversion


When I try running below query I get timestamp in UTC timezone.

select current_timestamp from table;

Can you please help me to convert timestamp to get in EST timezone.

Thanks


Solution

  • Try this instead:

    SELECT STRING(CURRENT_TIMESTAMP, 'America/New_York') AS current_timestamp
    FROM dataset.table
    

    This converts the timestamps to strings using the New York time zone.