4 Replies Latest reply on Nov 11, 2013 4:03 PM by ChadGist

    Fields to keep track of time

    ChadGist

      Title

      Fields to keep track of time

      Post

           I need to create some fields that we will manually be entering the number of hours spent working on a job in various departments. Is there a recommendation for how I should set up the field so the data entry person does not need to manually convert minutes to hours upon every entry?

           Thanks in advance for any help!

        • 1. Re: Fields to keep track of time
          philmodjunk

               You can set up fields of type time or (better) timestamp for recording the start and end times such as clocking in and out of a shift. The user either enters a time or clicks a button to enter the current date and time.

               Calculation fields can then compute the elapsed time in hours:

               ( TimestampEnd - TimeStampStart ) / 3600

               The difference between two time field or two timestamp fields will compute the elapsed time in seconds, so dividing by 3600, the number of seconds in an hour converts the result to hours.

          • 2. Re: Fields to keep track of time
            ChadGist

                 Thank you so much for the help!

                 In this application a time stamp isn't practical since much of this data will be derived from a follow up survey of how much time someone spent working on a product.

                 If I want to use a Time type of field though, it shows up as the time of day with AM or PM?

            • 3. Re: Fields to keep track of time
              philmodjunk

                   There's a reason for using TimeStamp instead of Time fields:

                   If the start time comes before midnight and the end time comes after midnight, subtracting the timeStart from the TimeEnd will not compute the correct time interval in seconds. If it is impossible that you will ever need to record such a time interval, then there is no problem using fields of type time instead of fields of type timestamp.

                   

                        If I want to use a Time type of field though, it shows up as the time of day with AM or PM?

                   This is simply a format controlling how the time is displayed. You can use the inspector's data tab to select a different format for recording the time so you might want to select a 24 hour format if you simply need to record time in elapsed hours:Minutes format.

              • 4. Re: Fields to keep track of time
                ChadGist

                     Thank you so much, that was what I needed!