Just completed the ultimate Infopath Timesheet (...Of Doom!!!)
Cue thunderbolts and lightning. I figured that "Infopath timesheet, no problem!" and "there will be one on Office Online". There were, but they are crap IMHO (Infopath 2003 and lots of javascript - what is this, 1997?).
The best starting point is here: InfoPath Team Blog : Calculating Elapsed Time…without code!
However, if you are planning to start modifying this sample, you better put your XPath Propeller hat on!