Skip to content
Advertisement

In SQL query (BigQuery) How get all rows where CreatedDatetime is Today in Moscow tz from column with UTC tz?

I have a table with CreatedDatetime column. This column is in UTC timezone (Values look like this:
2020-12-20 01:00:00 UTC). I need to get all rows where date is Today, but in Europe/Moscow timezone, which is +3 hours. Instead

I need something like this:

Advertisement

Answer

In Bigquery, you can convert an UTC timestamp to a local timezone like this:

Presumably, you want something like:

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement