Creator Help

eomonth

This topic describes the syntax and usage of the eomonth function in Zoho Creator.

Description

Returns the date in datetime format of the last day of the month,  after or before the specified number of months.  A positive value for months yields a future date; a negative value yields a past date. Use eomonth to calculate maturity dates or due dates that fall on the last day of the month.

Syntax

eomonth(<start_date>, <months>)

The eomonth function syntax has the following arguments.

start_date - A date in date/date-time format that represents the start date.

months - An integer that represents the number of months after or before the start_date.  A positive value for months yields a future date; a negative value yields a past date.

Note: This function is supported only in free-flow scripting mode of Script Builder. 

Return Value

A date (datetime) as per the date format specified in your application settings page

Example

 

   eomonth(today,3);           //returns October 31, 2013, if the today function returns a date falling in the month of July.
   eomonth(sale_date,1);      //returns February 28, 2014, if sale_date is 01/01/2014
   eomonth(sale_date, -1);    //returns December 31, 2013, if sale_date is 01/01/2014

Top