I have a template part with two fields, StartTime and EndTime. They are formatted as time in format 9:46.
I have a calculated field ("Total") that is also fomatted in the same way. The XPath expression for it is...
xdDate:AddSeconds(my:EndTime, -1 * (substring(my:StartTime, 1, 2) * 3600 + substring(my:StartTime, 4, 2) * 60))
I type 1:00 for StartTime, and 2:00 for EndTime but the Total is 17:00 when it should be 1:00
My computer's regional settings say that we are (UTC+08:00). It seems like the AddSeconds function is taking 8 hours off my result.
Can anyone plases advise on whether this is some sort of bug with the AddSeconds function or how the formula should be written using the AddSeconds function?