Skip 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.

Subtracting Dates from Dates

Featured Replies

How do I subtract a date from a date and get an answer by Years / Months / Days.

Example:

1-1-04 subtracted from 8-1-05 returns

1 year 7 months 0 days

Thank you,

Joseph

Example:

1-1-04 subtracted from 8-1-05 returns

1 year 7 months 0 days

to get the year you would:

(right(date2, 2))-(right(date, 2)

and so on with the day and month then recombine.

Try testing that with dates such as:

date1 = 11-1-04 , date2 = 1-1-05

date1 = 1-13-05 , date2 = 2-1-05

date1 = 1-1-99 , date2 = 1-1-01

To get the year of a date field = Year(date1)

How do you define months?

  • Author

Ok I know I should Understand all of that but I really do not... I have tried the example does not work the way I thought it would. Any other help on this subject would be very helpful.

Thanks,

Joseph

In this thread you will find both the formula and the explanation to Queue's remark.

  • Author

Thank you,

I would have never have figured this out without that.

Thank you,

Joseph

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.