addWeek
This topic describes the syntax and usage of the addWeek function in Zoho Creator .
Description
The addWeek function returns a date-time value after adding the specified number of weeks.
Syntax
(or)
// this format is supported only in the free flow scripting mode of Script builder.
The addWeek function syntax has the following arguments.
date-time - Required. The date-time value to which you are adding the specified week. Date-Time should be a date-time field type or as results of toTime() function.
int - Required. The number of weeks to be added to the date-time value.
Example
datetime = "Aug 21, 2013 16:04:37";
time = datetime.toTime();
meetingTime=time.addWeek(3) // returns September 11,2013 16:04:37
meetingTime=input.Date_Time.addWeek(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=addWeek(time, 3) // returns September 11,2013 16:04:37
meetingTime=addWeek(input.Date_Time, 5); // here, input.Date_Time refers to the date-time field in the form.