using the one from http://blogs.msdn.microsoft.com/infopath/2007/02/21/calculating-elapsed-timewithout-code/
and I have all the code good with a lot of custom stuff to add in lunches and our breaks ,,, but I wanna do overtime its been driving me mad ...
breaks we have two 10 minutes each ... and lunches are an 1 hour ..
Nevermind I got it
I just sum the total ... and then had a form with what number I wanted then sum that then subtracted it from the sum of the total ... and just make a rule to set value to 0 if less then 0
but this only works for one day ... how do I get it working for more then one day sum(total1) - fulltime that what I have in overtime and then I have fulltime sum(sumfulltime) which sumfulltime has 8
total is (((substring-before(EndTime, ":") * 60) + substring-before(substring-after(EndTime, ":"), ":")) - ((substring-before(StartTime, ":") * 60) + substring-before(substring-after(StartTime, ":"), ":"))) / 60 - Sumbreak - Sumlunch
turns out it breaks the code o need some thing to do hours and minutes of overtime