BigQuery's date functions put the date first and the part last, the opposite of many databases:
DATE_TRUNC(order_date, MONTH) is the first day of the month.
DATE_DIFF(later, earlier, DAY) counts the days between, later date first.
DATE_ADD(order_date, INTERVAL 30 DAY) and DATE_SUB(...) move a date.
EXTRACT(DAYOFWEEK FROM order_date) is 1 for Sunday up to 7 for Saturday.
FORMAT_DATE('%Y-%m', order_date) formats a date as text, and PARSE_DATE('%Y%m%d', '20250601') reads text as a date. The GA4 export stores dates that way.
LAST_DAY(order_date) is the end of the month.
CURRENT_DATE() is today: 1 July 2025 in this project, just after the data ends. TIMESTAMP columns have matching functions: TIMESTAMP_TRUNC, TIMESTAMP_DIFF.