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.

Calculation Using Dates

Featured Replies

  • Newbies

I am trying to create a field that automatically enter's a date 3 months prior to a field that contains a date. Example - Medication Y expires 12/30/2004, I want a field that automatically enters 9/30/2004.

Hi, Jorgy, and welcome to FM Forums!

If your field is named Expiration, then one possible calculation could be:

Date ( month ( expiration ) - 3 ; day ( expiration ) ; year ( expiration ) )

This calc has a pitfall, which is that if you enter 12/31/04 as your Expiration date, the date returned will be 10/1/04, as there is no such thing as 9/31/04. You can trap for such errors if this is not the desired result.

HTH.

Jerry

  • Author
  • Newbies

I tried the fomula you gave. Info as follows -

Expiration Date (a date field)

Three Months (calculation field)= Date((Expiration Date)-3 , Day(Expiration Date) , Year(Expiration Date) )

If I enter 9/30/2004 in Expiration Date, Three Months enters 11/30/2916

Any suggestions?

  • Author
  • Newbies

I found that I left out the word Month in the formula. It works when I inserted this word.

smile.gif

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.