Start a conversation

Adding hours or minutes to a time field

To add hours or minutes to the time entered into a time field, you can use the following calculation template.

For example, use this template to add 15 minutes:

var addHours = moment('{your_time_variable}', 'hh:mm');
new_time = addHours.add(15, 'minutes').format('HH:mm');
new_time;

Use this template to add 60 minutes:

var addHours = moment('{your_time_variable}', 'hh:mm');
new_time = addHours.add(60, 'minutes').format('HH:mm');
new_time;

When you add the template, replace {your_time_variable} with the variable you want to use and provide the number and hours/minutes you wish to add in the brackets e.g. (15, 'minutes').

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Castor Support Team

  2. Posted