Find the last day of the month

Description

In some SQL dialects there is a LAST_DAY function, but there isn’t one in BigQuery.
Looking for the best way to do this…

I want it to take in a DATE/DATETIME/TIMESTAMP and return the DATE of the last day of the month.

Thanks!!

That is, the day before the first day of the next month.

SELECT
DATE_TRUNC(DATE_ADD(CURRENT_DATE(), INTERVAL 1 MONTH), MONTH) - 1