This content has been marked as final. Show 3 replies
See Help Needed Formula, http://forum.planetpdf.com/wb/default.asp?action=9&read=52819&fid=100#144644 , for an example.
Or, calculate time difference, http://forum.planetpdf.com/wb/default.asp?action=9&read=53539&fid=34#148658
Thanks for the quick response. Your info clarified a lot for me. I was able to quickly create the following code for the third field formatted as a decimal number:
var oStart = util.scand("mm/dd/yy hh:mm", util.printd("mm/dd/yy ", new Date()) + this.getField("Start.0").value);
var oEnd = util.scand("mm/dd/yy hh:mm", util.printd("mm/dd/yy ", new Date()) + this.getField("End.0").value);
var DiffHours = (oEnd.valueOf() - oStart.valueOf()) / 1000 / 60 / 60;
this.getField("Hours.0").value = Number(DiffHours);
Couldn't have done it without you!
Would you happen to have an example of the oppsite, say I wanted to calculate the total hours worked, example two field, one has hours worked HH:MM (Field1) the second has HH:MM (Field2).. How would I go about adding them to give me the total hours worked. I tried to use the example about but found that it only works if your trying to find the difference but not a total.....