Working with dates

If you are having trouble formatting dates (especially in Sheets), the best way to get consistent format is to cast dates as a string.

BigQuery

Use *_TRUNC instead of format, e.g.

TIMESTAMP_TRUNC(timestamp, DAY) AS timestamp_day,

Was this page helpful?