1 Reply Latest reply on Nov 16, 2011 7:48 AM by philmodjunk

    Calculate with dates



      Calculate with dates


       I want to track the maintenance of our equipment in FileMaker Pro. Some needs maintenance each year, others each 40 days, others...

      So, I created three fields: 'Date of maintenance', 'Date of next maintenance', 'Maintenance interval'. Now, I want only to fill in the date of the current maintenance and FileMaker calculates the date of the next maintenance:

      'Date of next maintenance' = 'Date of maintenance' + 'Maintenance interval'

      I don't get there. How can I achieve this?

        • 1. Re: Calculate with dates

          Dates are actually special purpose number fields that store an integer counting the number of days from 12/31/0000 to the date recorded in that date field. You can thus treat them like number fields in calculations, but if the result is a date, you need to specify "date" as the return type.

          If MaintDate is a field of type Date and MaintInterval is a field of type number, then you can define cNextMaintenance as:

          MaintDate + MainInterval

          just be sure to select Date in the return type drop down or you'll see a large integer value (That number of days from 12/31/0000), instead of a date.