Choose where you’d like to start



The addMinutes function takes a date-time or time value and numberOfMins as arguments. It returns the date-time or time value after adding the specified number of minutes to it.

Note: The date-time value will be returned in the format specified in application settings.

Return Type

The return type of the function depends on the value it acts upon.

ValueData Type


<variable> = <dateTimeValue>.addMinutes(<numberOfMins>);


<variable> = addMinutes(<dateTimeValue>, <numberOfMins>);


<variable> = <timeValue>.addMinutes(<numberOfMins>);


<variable> = addMinutes(<timeValue>, <numberOfMins>);


ParameterData typeDescription
<variable>DATE-TIME/TIMEVariable which will contain the calculated date-time or time value.

(if the value is date-time)


The date-time value to which the specified number of hours should be added.

The date-time value can be specified without a time value, in which case 00:00:00 will be taken as the default time value.

If the hour value is specified as 24 or more, the date-time value be reset to 00:00:00. If the minutes value is specified as 60 or more, the mm:ss value will be reset to 00:00, if the seconds value is specified as 60 or more, the ss value will be reset to 00.

A runtime error will be encountered if:

  • the hour value, or minute value, or second value, is specified in more than 2 digits.
  • the date value exceeds the number of days in that month.
  • an incorrect month value is specified.
  • the year value has more than 4 digits.

Refer date-time data type to learn more about date-time data type.


(if the value is time)


The time value to which the specified number of minutes should be added.

Time data type is currently supported only in Zoho Creator

TIME values are represented in the formats - hh:mm:ss a (12-hour format) and HH:mm:ss (24-hour format)

A runtime error will be encountered if:

  • Declared time values cannot skip either the seconds part or seconds and minutes parts altogether. In the event the value does not conform to the supported time formats, an error message will be thrown.
  • TIME values in no way should fall outside the 24 hour range. A value declared like "23:59:60" would throw an error.
  • Operations (like addHour, subMinutes) on TIME values which result in a value outside the 24-hour range will also result in an error.

Refer time data type to learn more about time data type.


The number of minutes to be added to date-time or time value.

A negative number will subtract the specified number of minutes from the date-time or time value.


Date-Time Examples:

 currentDate = '01-Jan-2019';
 info currentDate.addMinutes(1); // Returns '01-Jan-2019 00:01:00'
 currentDate = '01-Jan-2019 23:59:10';
 info currentDate.addMinutes(2); // Returns '02-Jan-2019 00:01:10'

Time Examples (only for Creator):

// The below code tries to add hours to a "time" value beyond the 24-hour range 
 timeValue = '00:00:00';
 info timeValue.addMinutes(-4); // throws the error - "Invalid Operation. Value outside 24 hour range"
 currentTime = '13:15:10';
 info currentTime.addMinutes(1);  // Returns '13:16:10'

Get Started Now