Hello!
I'm building a timesheet form in which I need to calculate the difference between start and end times and present the result.
I'm trying to do this with FormCalc but if it is easier with JS it's ok too.
So this is what I did on the total field, using the calculate event on a NUMERIC field called decimalValue:
elapsed = Time2Num(endTime.formattedValue, "HH:MM") - Time2Num(startTime.formattedValue, "HH:MM")
And then I tried to convert into a time field:
total = decimalValue.rawValue;
$.formattedValue = Num2Time(total, "HH:MM")
Well, it doesn't work, it gives me crazy results in the datetime (total) field. If I type 09:00 and 09:30, the end result is... 22:30. Huh?
Please, could someone help me understand how this thing works?
Thank you very much for any hints!
Marcos
Solved! Go to Solution.
Hi Marcos,
Here are a few examples:
https://acrobat.com/#d=kCPIgVkd09qrx6h-WRXxbQ
https://acrobat.com/#d=EsWqBMBt3sgEXnMSsK5pRA
Hope that helps,
Niall
Hi Marcos,
Here are a few examples:
https://acrobat.com/#d=kCPIgVkd09qrx6h-WRXxbQ
https://acrobat.com/#d=EsWqBMBt3sgEXnMSsK5pRA
Hope that helps,
Niall
Thank you NIall!
Always coming to the rescue! Thanks!!
Marcos
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies