Returns the last day of the specified period (month, quarter, or year).
DATEDiperbarui: 13 Jun 2026LAST_DAY(date_expression [, date_part])Input date
MONTH, QUARTER, or YEAR (default: MONTH)
Default: MONTH
1 SELECT 2 date, 3 LAST_DAY(date) as last_day_of_month 4 FROM UNNEST([DATE '2024-02-15', DATE '2024-06-01', DATE '2024-12-25']) as date;
Finds the last day of the month for various dates.
| date | last_day_of_month |
|---|---|
| 2024-02-15 | 2024-02-29 |
| 2024-06-01 | 2024-06-30 |
| 2024-12-25 | 2024-12-31 |
1 SELECT 2 date, 3 LAST_DAY(date, QUARTER) as last_day_of_quarter 4 FROM UNNEST([DATE '2024-02-15', DATE '2024-08-01']) as date;
Last day of the quarter for report planning.
| date | last_day_of_quarter |
|---|---|
| 2024-02-15 | 2024-03-31 |
| 2024-08-01 | 2024-09-30 |
Sudah paham LAST_DAY? Latih langsung di browser
Latihan interaktif, langsung di browser.