Jump to content

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

Recommended Posts

Posted

I figure this should be a simple one for y'all experts. I want to calculate months between two dates, similar to the DATEDIF function in excel. And if there is a way to include an IF-THEN function so that it doesn't give me a negative number if the second date is missing, even better. Thanks

justus

Posted

quote:

Originally posted by justusmin:

I figure this should be a simple one for y'all experts. I want to calculate months between two dates, similar to the DATEDIF function in excel. And if there is a way to include an IF-THEN function so that it doesn't give me a negative number if the second date is missing, even better. Thanks

justus

Here it comes

code:


Case ( not IsEmpty (dat1), Month(dat2)-Month(dat1)+12*(Year(dat2)-Year(dat1)))

Dj

Posted

I appreciate the quick response. Allow me to show my ignorance here. Where do I enter this formula. I tried creating a calculation field and entering it there, but my values are way off. (ex. 5-28-1998 to 10-1-1998 is -9281, 6-30-1998 to 1-8-1999 gives 53279). thanks

Posted

quote:

Originally posted by justusmin:

I appreciate the quick response. Allow me to show my ignorance here. Where do I enter this formula. I tried creating a calculation field and entering it there, but my values are way off. (ex. 5-28-1998 to 10-1-1998 is -9281, 6-30-1998 to 1-8-1999 gives 53279). thanks

Just make sure that dat1 and dat2 are of type "date", and the result of calculation is number.

Dj

[ April 20, 2002, 01:31 PM: Message edited by: dj ]

This topic is 8323 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.