Total number of hours from date and time fields


need script calculates total hours spent on project using 4 fields follows:
date field 1=from date (mm/dd/yyyy)
time field 1=from time (24 hour clock)
date field 2=to date (mm/dd/yyyy)
time field 2=to time (24 hour clock)

numeric calculation field=total time spent on job

ex. 08/30/2007 2300 hrs 08/31/2007 0600 hrs = 7 hours total

any ideas?

yes, livecycle designer can can use either fromcalc's "time2num()" function number of milliseconds epoch date passed date time string, or use javascript's datetime object number of milliseconds epoch date. both of these methods format string date , time important in getting correct value of milliseconds epoch date.

once 1 has milliseconds epoch date start , end times, 1 need compute difference between 2 values , and convert result days, hours, minutes, seconds, milliseconds needed.


More discussions in LiveCycle pre-ES (6.x and 7.x) discussions


adobe

Comments