1 Reply Latest reply on May 26, 2009 6:46 AM by comment_1

    Elapsed Time Calculation



      Elapsed Time Calculation

      Description of the issue

      Filemaker Pro Advanced 10.0v1Windows Vista The problem occures when calculating elapsed time at the end/beginning of the day, eg., if start time = 11PM and end time = 12AM (midnight) end time - start time SHOULD = 1 hour, instead the result returned is -23:00:00.  On the other hand, if for a start time you use 12AM or 0AM for start time and 9AM for end time, the result of end time - start time returns 9 hour.  In fact 9AM -12AM SHOULD return the -23:00:00.  I understand the mathmatical quandry here but I think from a user interface prespective it makes more sense to make 12PM be the very last miniscule second of the day and 0 to be the starting instant of the new day.  That way you can have 24 hours in a day by subtracting start time (0) from end time (12PM).  Not Possible at the moment. Best regards, Bruce PS.  I hate reporting "annomallys" w/o also saying how great this program is.  I absolutely love it and I can easilly work around this problem BUT I'm trying to make an application where my users probably won't understand the "work around". 

        • 1. Re: Elapsed Time Calculation

          Filemaker counts time as the number of seconds elapsed since midnight. And midnight is midnight, whether you choose to display it as 0:00:00 or 12:00:00 AM.



          If you want time differences to be always positive (i.e. assume that a negative result is due to crossing midnight), use a calculation =


          Mod ( EndTime - StartTime ; 86400 )


          or change your fields type to Timestamp.