EOMONTH()

Date of last day of a month from Date or DateTime

Returns the date of the last day of a month from Date or DateTime  value.

Sample usage

EOMONTH("3/15/2020", 3) returns  6/30/2020

EOMONTH("2/1/2020", 0) returns  2/29/2020

EOMONTH(TODAY(), 0) or EOMONTH(NOW(), 0)  returns last day of the current month.

EOMONTH(TODAY(), 1) returns last day of next month.

EOMONTH(TODAY(), -1) returns last day of last month. Equivalent to (TODAY() - DAY(TODAY())) .

EOMONTH(TODAY(), 0) + 1 returns first day of next month.

EOMONTH(TODAY(), -1) + 1 returns first day of this month. Equivalent to (TODAY() - DAY(TODAY()) + 1) .

EOMONTH(TODAY(), -2) + 1 returns first day of last month.

EOMONTH(TODAY(), 0) + DAY(TODAY()) returns one month from today.

EOMONTH(TODAY(), -1) + DAY(TODAY()) returns today. Equivalent to TODAY() .

EOMONTH(TODAY(), -2) + DAY(TODAY())  returns one month ago today.

(DAY(EOMONTH(("2/1/" & (YEAR(TODAY()) + 1)), 0)) > 28) (returns  Yes/No ) returns  TRUE if next year is leap year.

Syntax

EOMONTH( when , offset-months )

  • when - A  Date or DateTime value.
  • offset-months ( Number ): A number of months to add to or subtract from when before computing the last day of the month. For instance, 0 would find the end of the month specified by when ; 1 would find it for the month after when ; and -1 would find it for the month prior to  when.

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()

See also

Date and time expressions

DAY()

EOWEEK()

EWOMONTH()

MONTH()

WORKDAY()

Was this helpful?

How can we improve it?

Need more help?

Try these next steps:

true
Search
Clear search
Close search
Google apps
Main menu
5014928821561725523
true
Search Help Center
true
true
true
false
false
false
false
Create a Mobile Website
View Site in Mobile | Classic
Share by: