Returns the last day of the specified date part (eg “month”) for a given date.

Usage

LastDay(date, precision)

date (required) The date from which the last day of the date part is to be computed.

precision (required) The date part to be extracted, chosen from “year”, “quarter” “month”, or “week”.

Examples

(1) Extract the last month from the [Invoice Date] column:

LastDay([Invoice Date], "month")

Screen_Shot_2020-07-30_at_12.09.47_PM.png

(2) Extract the last year from an explicit date:

LastDay(Date("2020-01-10 10:34:29"), “year”)

Screen_Shot_2020-07-30_at_12.14.42_PM.png

See Also

DatePart