How can I get the total duration of this 2 field?
Start and End time are both single line of text.
This is my current code:
function GetTotalDuration(executionContext) {
var formContext = executionContext.getFormContext();
var varStartTime = formContext.getAttribute("new_starttime").getValue();
var varEndTime = formContext.getAttribute("new_endtime").getValue();
var varDuration = varEndTime - varStartTime
alert(varDuration);
}
the alert result is 7247:16. This should be 1 hour and 8 mins.