Jump to content

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

Recommended Posts

  • Newbies
Posted

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.

Posted

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

  • Newbies
Posted

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?

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