The LastDay function evaluates a specified date component (i.e., year, quarter, month, or week) in a date value and returns the last date and time in that component.
For more information (including use case exercises) about date functions, see the Common Date Functions and Use Cases QuickStart.
- date (required) - the date or column containing date values from which the date component is extracted
precision (required) - the date component (i.e., year, quarter, month, or week) evaluated for its last date and time
LastDay([Invoice Date], "month")
Extracts the month component from the date in the Invoice Date column and returns the last date and time for that month.
LastDay(Date("2020-01-10 10:34:29"), “year”)
Extracts the year component from the specified date (January 10, 2020) and returns the last date and time for that year.