Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

calculating days between two dates

Featured Replies

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

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

  • Author

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

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 ]

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.