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.

Add Years to Date Formula/Calc

Featured Replies

I am FM challenged and would appreciate a shove in the correct direction re: a couple of date formulas/calculations, if possible...

The first is to create a new date field by adding two years to an exisiting date field.

The second is to create a new date field by first searching multiple date fields, confirming all contain a date, then finding the oldest date of the multiple fields and adding two years.

Edited by Guest

Hi catldogn, and welcome to the Forum.

I am FM challenged

LOL, aren't we all. :giggle:

For the first calculation, try this

Date ( Month ( YourDateField ) ; Day ( YourDateField ) ; Year ( YourDateField )+2 )

Not quite clear on what you are envisioning.

Why not view the file in Table View, and sort by the date.

or,

Do a search for a Range of Data on the date, looking for the range that you want.

To add the 2 year requirement, wouldn't the calculation field already have done that?

HTH

Lee

  • Author

I'm probably complicating things, to try to clarify - we are tracking search and rescue qualification/expiration dates, which are different for each team member. First, the member must have completed all qualification sections (have a completion date for CPR, First Aid and Survival), then the expiration would equal two years from the oldest date.

Member #1

2/15/08 - CPR

1/13/09 - First Aid

3/23/09 - Survival

Expiration = 2/15/10 (two years from the oldest date of 2/15/08)

Member #2

2/20/10 - CPR

9/21/09 - First Aid

6/15/09 - Survival

Expiration = 6/15/11 (two years from the oldest date of 6/15/09)

Etc.

Edited by Guest
To Say Thanks for Helping!

  • Author

Or, I could manually enter expiration for each qualification section (enter a date with the two years already added), if there's a way to then search those multiple date fields for the oldest date and grab that date for the new expiration date field? Basically the expiration = the oldest date.

If it's always the same three date fields for everyone, try:

Let (

exp = Min ( CPR ; First Aid ; Survival )

;

Date ( Month ( exp ) ; Day ( exp ) ; Year ( exp ) + 2 )

)

  • Author

First, thanks for working through this with me, I do truly appreciate the time and effort involved!

Okay, I'm testing away... and have decided that being there's no way around manually adding a date, I may as well manually add the date with the two years already added.

That being done, is there now a way to search date field 1, date field 2 and date field 3, find the oldest date, and put in a new date field?

have decided that being there's no way around manually adding a date, I may as well manually add the date with the two years already added.

I am not sure that's a good idea. In any case, to calculate the earliest date out of three, use the Min() function as shown above.

  • Author

Super nice! I removed the +2 and it worked perfectly... except, I need to add something that requires a date in all the specified date fields in order to calculate.

Why?

  • Author

Because, in the case of the following, the formula returns 2/15/08, when I need it to be "nothing" because there is no date for First Aid, meaning the team member has not completed all the required sections.

2/15/08 - CPR

"no date" - First Aid

3/23/09 - Survival

Try something like:

Case (

CPR and First Aid and Survival ;

<-- the calc goes here -->

)

  • Author

I'm blowing it somewhere...

Case (

BasicCPR and BasicFirstAid and BasicMapComp and BasicRadioCom)

Let (

exp = Min ( BasicCPR ; BasicFirstAid ; BasicMapComp ; BasicRadioCom )

;

Date ( Month ( exp ) ; Day ( exp ) ; Year ( exp ))

It should be:

Case (

BasicCPR and BasicFirstAid and BasicMapComp and BasicRadioCom ;

Let (

exp = Min ( BasicCPR ; BasicFirstAid ; BasicMapComp ; BasicRadioCom )

;

Date ( Month ( exp ) ; Day ( exp ) ; Year ( exp ) + 2 )

)

)

But if you're not adding the 2 years, then it can be simply:

Case (

BasicCPR and BasicFirstAid and BasicMapComp and BasicRadioCom ;

Min ( BasicCPR ; BasicFirstAid ; BasicMapComp ; BasicRadioCom )

)

  • Author

Thanks so very much... that worked great!

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.