### Title

Calculating dates

### Post

Hi Filemaker Forum,

I am looking for some help calculating the difference in months between 2 dates. I am using Filemaker Pro Adv 10.

I have 3 fields.

1st field is drop down date commencement.

2nd field is drop down date cancellation.

3rd field I want to be able to calculate the difference between field 1 & 2 to round up to a complete month.

i.e. 19/07/2009 09/07/2010 12

I am not sure if it is possible for Filemaker to calculate the difference as a number when the 2 defining fields are xx/xx/xxxx to begin with.

Any help would be greatly appreciated,

k7rks01

I believe Filemaker can do any date calculation you can think of (at least I haven't come up against one that couldn't be done yet). The problem here is not "how", but "what".

If you can define the rules in a way that would enable a person to get the corect result using paper and pencil (or perhaps a calendar and fingers in this case), it can be done in Filemaker.

---

As an example, this calculates the difference in months, ignoring the day of month =

12 * ( Year ( EndDate ) - Year ( StartDate ) ) + Month ( EndDate ) - Month ( StartDate )