Skip to main content
Evaluates a specified date component in a date value and returns the last date and time in that component as a timestamp. Category: date Syntax:
LastDay([date], "precision")
Returns: DateTimeColumn Context Filtering: ✓ Yes

Parameters

NameTypeRequiredDescription
datecolumn|datetime✓ YesThe date or column of date values from which the date component is extracted.
precisiontext✓ YesThe date component to evaluate for its last date and time.
Allowed Values for precision: year, quarter, month, week Allowed Column Types: DATETIME, DATE

Validation

  • Minimum parameters: 2
  • Maximum parameters: 2

Examples

LastDay([Invoice Date], "month")
Extracts the month component and returns the last date and time for that month.
LastDay(Date("2020-01-10 10:34:29"), "year")
Returns the last date and time for the year of the given date.
Last modified on March 13, 2026