Time Calculation Issue With AddSeconds Function in Infopath 2010

I have a template part with two fields, StartTime and EndTimeThey 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?

August 22nd, 2013 11:29pm

The Time would capture your system time from OS and make sure your time zone is setting correct.

YoungC

Free Windows Admin Tool Kit Click here and download it now
August 29th, 2013 9:49pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics