4 Replies Latest reply on Aug 13, 2014 12:31 PM by rakeshkatipalli

    Calculate Elapsed time



      Calculate Elapsed time


      FileMaker Pro



      Description of the issue


      I want to  calculate the time elapsed since the last modified date. For example, if the last modified date of a record was 8/1/14 2pm and today is 8/8/14 2pm, then the new "time elapsed"  field needs to display "7 days and 0 hrs" since the record was last modified.

      Thanks in advance

        • 1. Re: Calculate Elapsed time

               Report An Issue is intended for Reporting Possible Software bugs. Questions on how to work with FileMaker Pro should be posted in the FM Pro Forum Section. (See tab at top of this screen.)

               Make that modification date field a a modification timestamp field that auto-enters the modification timestamp.

               Define an unstored calculation field as:

               Let ( seconds = Get ( CurrentTimestamp ) - ModificationTimestamp ;
                       Div ( seconds ; 24 * 3600 ) & " Days " & Div ( Mod ( seconds ; 24 * 3600 ) ; 3600 ) & " Hours since last modification."
                     ) // let

          • 2. Re: Calculate Elapsed time

                 Hi PhilModJunk,

                 Thanks for the reply.I am very new to this technology. I have tried as it is you have given but i could not find the solution. I don't know how to calculate the modification timestamp. It has to display in the calculation field automatically whenever i modify the record. Please give me the steps clearly. 

                 Thanks in advance

            • 3. Re: Calculate Elapsed time

                   rakesh katipalli:

                   Thank you for your posts.

                   "ModifcationTimestamp" is a Timestamp field with the Auto-Enter option of Modification Timestamp.  Follow these steps:

                   1. Go to Manage > Database...

                   2. Under the Fields tab, create a Field Name "ModificationTimestamp" (without the quotes), make the Type "Timestamp", and click "Create".

                   3. With the field still highlighted, click "Options...".

                   4. In the window Options for Field "ModificationTimestamp", click the "Auto-Enter" tab.

                   5. Under the section "Automatically enter the following data into this field:", enter a checkmark into the second checkbox "Modifccation" and the pop-up to the right of that will read "Timestamp (Date and Time)".

                   6. Click OK to exit the window and return you to the field definitions.  Click OK again to exit Manage Database.

                   This "ModificationTimestamp" field will be now be updated when any change is made to the record.

                   Proceed with creating the calculation field that PhilModJunk outlined above.

                   Let me know if you run into any difficulty.

                   FileMaker, Inc.

              • 4. Re: Calculate Elapsed time

                     Thank you so much. It is working