I am trying to add 2 time fields together to get a total time. Here are the 2 fields default values that I am adding together. The formula verifies but when I preview the form the field displays NaN.
concat(substring(100 + number(concat("0", substring(EndTime, 1, 2))) - number(concat("0", substring(EndTime, 1, 2))), 2, 2), ":", substring(100 + number(concat("0", substring(EndTime, 4, 2))) - number(concat("0", substring(StartTime, 4, 2))), 2, 2), ":", substring(100 + number(concat("0", substring(EndTime, 7, 2))) - number(concat("0", substring(StartTime, 7, 2))), 2, 2)) + concat(substring(100 + number(concat("0", substring(FromEnd, 1, 2))) - number(concat("0", substring(FromStart, 1, 2))), 2, 2), ":", substring(100 + number(concat("0", substring(FromEnd, 4, 2))) - number(concat("0", substring(FromStart, 4, 2))), 2, 2), ":", substring(100 + number(concat("0", substring(FromEnd, 7, 2))) - number(concat("0", substring(FromStart, 7, 2))), 2, 2))
The 2 fields I am trying to add together are text box with Time data types, the field that I am trying to display the above formula in is text box with data type Text(string).
Not sure how to fix it.