7 Replies Latest reply on Nov 20, 2013 8:36 AM by philmodjunk

    count with time

    Maikel

      Title

      count with time

      Post

           I'm looking for a solution to the following situation;

           Date (stamp on creation)
           TimeStart - (time input)
           TimeStop - (time input)
           Cal_total-time<< ???

           now I'm looking for a calculation field that counts the hours the hours between start and stop time but the field must also take into consideration the date, at midnight must therefore also by counting.

           I am equally tried with a timestamp option but I can not figure it out :(

        • 1. Re: count with time
          philmodjunk

               Timestamps will allow for midnight automatically.

               TimestampEnd - TimeStampStart

               computes the elapsed time in seconds. You can select time as a result type or use:

               ( TimestampEnd - TimeStampStart ) / 3600

               with a number result type to get the elapsed time in hours.

          • 2. Re: count with time
            Maikel
                 Thank you!
                 Now a'm using use the timestamp my values list does not work anymore. 

                 Do you have an solution to get a dropdownlist counting by Quarters?
            • 3. Re: count with time
              philmodjunk

                   Please explain how you need your value list to work. What values are you selecting from it? How does the value list affect this calculation?

              • 4. Re: count with time
                Maikel

                     I want the fields to use to calculate spent time. The timesstamp set te time in minutes but I want to finish by quarters by invoice. 

                     For example;

                     12.00 unto 13.15 (and not 13,14) that way I always keep a nice calculation resulting from the input.
                     12.00 unto 13.15 = 1,25
                     12.00 unto 13.14 = 1,2333333333333333

                     To avoid this,i want the list of options of import thus affect per quarters

                • 5. Re: count with time
                  philmodjunk

                       Do you mean that you want to round elapsed time to the nearest 15 minutes? This is a common way to compute elapsed time on employee time cards and easy to include as part of the calculation to compute elapsed time.

                       But  what does that have to do with your "values list"?

                  • 6. Re: count with time
                    Maikel
                         Thanks for the solution, is this solution count automatically? Because that's  not what I'm looking for.
                         The reason I told the value list what's the best solution for me is the vision that I want to use a field with a drop-down list with blocks from 15 minutes .
                          
                    Start            Date                 Stop               Date                   Calculation hours
                    (dropdown)                          (dropdown)
                         00:00     V   20-11-2013       00:00     V      20-11-2013         timestamp Stop - timestamp Start  = 0.25 Hour(s)
                    00:15                                   00:15
                         00:30                                   00:30
                         00:45                                   ......
                         01:00
                         01.15
                         .....
                          
                    • 7. Re: count with time
                      philmodjunk

                           You can use a time field for the time and a date field for the date. Then your calculation can be modified to be this to compute the elapsed hours:

                           ( TimeStamp ( StopDate ; StopTime ) - TimeStamp ( StartDate ; StartTime ) ) / 3600