Creator Help

addDay

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

Description

The addDay function returns a date-time value after adding the specified number of days. 

Syntax

<date-time>.addDay(int)

(or)

addDay(date-time, int)

// this format is supported only in the free flow scripting mode of Script builder.

The addDay function syntax has the following arguments.

date-time - Required. The date-time value to which you are adding the specified days. Date-Time should be a date-time field type or as results of toTime() function.

int - Required.  The number of days to be added to the date-time value. 

Example

datetime = "Aug 21, 2013 16:04:37";
time = datetime.toTime();

meetingTime=time.addDay(3)       // returns Aug 24, 2013 16:04:37
    

meetingTime=input.Date_Time.addDay(5);  // here, input.Date_Time refers to the date-time field in the form.

datetime = "Aug 21, 2013 16:04:37";
time = datetime.toTime();

meetingTime=addDay(time, 3)       // returns Aug 24, 2013 16:04:37
    

meetingTime=addDay(input.Date_Time, 5);  // here, input.Date_Time refers to the date-time field in the form.

Top