Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6720 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

this seems like it should be simple but has had me stumped. i'm trying to get the numeric difference, in days or months, of the difference between two dates. one of these date fields will always be later than the other. when i set it up as "datelater - dateearlier" and output to number, then i get fairly accurate results if the difference is a year or two. but i'm doing a longterm medical study and the differences are often 15 to 25 years and filemaker is returning numbers that are usually way off (though, even in this range, they are sometimes almost accurate). what's going on and how do i fix this?

andrew

Posted

Your calc, 'datelater - dateearlier' will return the number of days between them, even when they span many years. Perhaps you're trying to convert the result to months or years?

Posted

for dateearlier=9/15/86 and datelater=2/1/05 i come up with 6705 days (365/yr, 30/mo) plus 5 days for leap years makes it 6710. the datelater - dateearlier calc comes up with 6714 days. i can't account for the 4 days.

Posted

The problem is not with Filemaker, but with your control calculation.

From 9/15/1986 to end of the month: 16 days;

Oct 1986: 31 days;

Nov 1986: 30 days;

Dec 1986: 31 days;

1987 - 2004 (incl.): 18 years;

5 leap years (1988, 1992, 1996, 2000, 2004 );

Jan 2005: 31 days

16 + 31 + 30 + 31 + 18*365 + 5 + 31 = 6714

This topic is 6720 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.