The eomonth() function takes dateTimeValue and numberOfMonths as arguments. It adds the specified number of months to the given date-time value, and returns the last date value from the resulted date-time value.

The date value (without time value) will be returned in the format specified in Application Settings.

Return Type

  • Date-Time




ParameterDescriptionData type
<variable>Variable which will contain the returned date-time value.DATE-TIME

The date-time value to which the specified number of months will be added, and the last date value will be returned from the resulted date-time value.

The time value is not taken into account while using this function.

A runtime error will be encountered if:

  • the date value exceeds the number of days in that month.
  • an incorrect month value is specified.
  • the hour value, or the minutes value, or the seconds value is specified in more than 2 digits.
  • the year value has more than 4 digits.

Refer this help document to learn about the supported date-time formats.


The number of months to be added to dateTimeValue.

A negative number will subtract the specified number of months from dateTimeValue.



currentDate = '01-Jan-2019';
newDate = currentDate.eomonth(1);      // returns '28-Feb-2019'

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeluge.com