Returns the date of the last weekday (Monday through Friday) of the month specified by the Date or DateTime value.
Sample usage
EWOMONTH("3/15/2020", 3) returns 6/30/2020
EWOMONTH("2/1/2020", 0) returns 2/28/2020
EWOMONTH(TODAY(), 0) or EWOMONTH(NOW(), 0) returns the date of the last weekday of the current month. See also: NOW(), TODAY().
EWOMONTH(TODAY(), 1) returns the last weekday of next month.
EWOMONTH(TODAY(), -1) returns the last weekday of last month.
Syntax
EWOMONTH(when, offset-months)
when- ADateorDateTimevalue.offset-months(Number): A number of months to add to or subtract fromwhenbefore computing the last day of the month. For instance,0would find the end of the month specified bywhen;1would find it for the month afterwhen; and-1would find it for the month prior towhen.
Note
Some constant values, such as "MM/DD/YYYY", are evaluated as a Date value by AppSheet. Similarly, "000:00:00" is evaluated as a Duration value. This doesn't mean your spreadsheet data must use the same formats: the date and time formats in your spreadsheets are determined by the locale/language setting. Column will always be evaluated as the type of column. Additionally, you can convert data, both columns and string literals, to specific types using functions such as DATE(), TIME(), or DATETIME().