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.
|<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:
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.
newDate = currentDate.eomonth(1); // returns '28-Feb-2019'