0

It seems easy to calculate time difference in InfoPath new form but I couldn’t gate an answer for it. I don’t have a repeating table so all the resources I checked has repeating table and couldn’t work when I tried. what I want to achieve is as follows... I have three fields in a SharePoint list and customized in InfoPath

1, Time In 2, time Out 3, Total Hours

Time out -Time In= Total hour

please remember I don’t have a repeating table. I currently use a SharePoint calculated field for the Total Hours field but the problem is when users inter their time in and time out field, it doesn’t show them their total hour on the form. If there is another solution am willing to leave the SharePoint calculated total hour field and create another one inside InfoPath.

Thanks for your help in advance!!!

0

Can you go through the below link. I hope it might help you

http://googleweblight.com/i?u=http://www.infopathdev.com/forums/p/9687/75078.aspx&grqid=DcwxqRvh&hl=en-IN

0

After a lot of searching I managed to figure out subtracting date and time field came from SharePoint list. the steps I took was as follows… 1. Create two date and time fields and take the value from Time In and Time Out fields and parsed the date stamp from them 2. Change the format in to military time 24H format. 3. Create another filed for today’s Total Time and use the below formula on XPath

translate(xdDate:AddSeconds(../my:EndTime, -1 * (substring(../my:StartTime, 1, 2) * 3600 + substring(../my:StartTime, 4, 2) * 60 + substring(../my:StartTime, 7, 2))), "ER?", "")

You can see the formula at the following link http://www.braintrove.com/id/95

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.