subSeconds
This topic describes the syntax and usage of the subSeconds function in Zoho Creator .
Description
The subSeconds function returns a date-time value after subtracting the specified number of seconds.
Syntax
(or)
// 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.subSeconds(10) // returns Aug 21, 2013 16:10:10
meetingTime=input.Date_Time.subSeconds(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=subSeconds(time,10) // returns Aug 21, 2013 16:10:10
meetingTime=subSeconds(input.Date_Time,25); // here, input.Date_Time refers to the date-time field in the form.
