Adding hours or minutes to a time field in EDC/CDMS
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').