Creator Help

addMinutes

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

Description

The addMinutes function returns a date-time value after adding the specified number of minutes. 

Syntax

<date-time>.addMinutes(int)

(or)

addMinutes(date-time, int)

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

The addMinutes function syntax has the following arguments.

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

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

Example

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


meetingTime=time.addMinutes(20)       // returns Aug 21, 2013 16:50:37
meetingTime=time.addMinutes(40)       // returns Aug 21, 2013 17:10:37
meetingTime=input.Date_Time.addMinutes(20);  // here, input.Date_Time refers to the date-time field in the form.

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


meetingTime=addMinutes(time, 20)       // returns Aug 21, 2013 16:50:37
meetingTime=addMinutes(time, 40)       // returns Aug 21, 2013 17:10:37
meetingTime=addMinutes(input.Date_Time, 20);  // here, input.Date_Time refers to the date-time field in the form.

Top