Function: LastDay
Description
Returns the date of the last day of the interval in which the given date falls, where interval_type specifies the type of time interval.
Syntax
LastDay(date)
Arguments
Date may be any valid date in the range 1/1/1601-12/31/2400.
Interval_type is a string which specifies the type of time interval. Possible values are "year", "halfyear", "quarter", "month", "week", "day", "fiscal_year", "fiscal_halfyear", "fiscal_quarter", "fiscal_period", "fiscal_week", "iso_year", and, "iso_week".
Return value
This function returns a date.
Calculated field example
If the Ship Date field contained the date 1/1/2008, the following expression would return 6/30/2008: LastDay([Ship Date],"halfyear")
Filter/Find example
The following expression would select or find all the orders shipped on the last day of the current quarter: [Ship Date] = LastDay([Ship Date],"quarter")
NOTE: The examples above assume that the appropriate time interval settings have been specified via the Time Intervals wizard.