Creator Help

subMinutes

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

Description

The subMinutes function returns a date-time value after subtracting the specified number of minutes. 

Syntax

<date-time>.subMinutes(int)

(or)

subMinutes(date-time, int)

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

The subMinutes function syntax has the following arguments.

date-time - Required. The date-time value from which you are subtracting the specified number of minutes. Date-Time should be a date-time field type or as results of toTime() function.

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

Example 

datetime = "Aug 21, 2013 16:10:00";
time = datetime.toTime();

meetingTime=time.subMinutes(10)       // returns Aug 21, 2013 16:00:00
meetingTime=input.Date_Time.subMinutes(25);   // here, input.Date_Time refers to the date-time field in the form.

datetime = "Aug 21, 2013 16:10:00";
time = datetime.toTime();

meetingTime=subMinutes(time, 10)       // returns Aug 21, 2013 16:00:00
meetingTime=subMinutes(input.Date_Time, 25);   // here, input.Date_Time refers to the date-time field in the form.

Top