Creator Help

subSecond

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

Description

The subSecond function returns a date-time value after subtracting the specified number of seconds. 

Syntax

<datetime>.subSecond(int)

(or)

subSecond(date-time, int)

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

The subSecond function syntax has the following arguments.

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

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

Example

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

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

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

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

Top