1 Reply Latest reply on Sep 25, 2015 8:24 AM by gkaiseril

    Need to calculate hours worked from time in time out

    brantpro


      Hello I need to calculate hours worked from time in time out. My box identifiers are Time InS, Time OutS, hours worked box is AT WorkS. So if time in is 07:30 and time out is 16:30 calculate total hours worked.

      Thank you

        • 1. Re: Need to calculate hours worked from time in time out
          gkaiseril MVP & Adobe Community Professional

          A time value without a reference to the date for the time values is an issue. For areas that observe day light savings time not all local time values compute to the strict difference in the time values. Some may show one hour less than the time values because the local hours skip the time values from 02:00 to 03:00 and for local use those values do not exist.

           

          Have you looked at the use of the "util.scand" method to convert a date and time value to the date object?

           

          If your time intervals will never occur on the date and time of the day light savings time change, then one can parse the time strings into the hour and minute components and then either compute the hours and minutes separately and then adjust and combine or convert the hours and minutes values into a common time unit, then do the computation, and then reformat the result back into hours and minutes format.

           

          Do not confuse an event time values with the elapsed time value. Acrobat forms recode the event time so the time values are between 00:00 and 23:59 only since these are the hours and minutes that occur within a day unit.