Newer Version Available
Last Day in the Week, Month, Quarter, or Year
Returns the date of the last day in the specified week, month, quarter, or
year.
Usage
Use these functions in a foreach() statement. You cannot use them in group by, order by, or filter statements.
Use the functions whose names begin with week, month, quarter, and year with standard calendar year dates. Use the functions whose names begin with fiscal with fiscal year dates.
week_last_day(date)
Returns the
date of the last day of the week for the specified date.
fiscal_week_last_day(date)
Returns the fiscal date of the last day of
the week for the specified date.
month_last_day(date)
Returns the date
of the last day of the month for the specified
date.
fiscal_month_last_day(date)
Returns
the fiscal date of the last day of the month for the specified
date.
quarter_last_day(date)
Returns the
date of the last day of the quarter for the specified
date.
fiscal_quarter_last_day(date)
Returns the fiscal date of the last day of the quarter for the specified
date.
year_last_day(date)
Returns the date of the last day of the year for the specified date.
fiscal_year_last_day(date)
Returns the fiscal date of the last day of the year for the specified date.