Newbies Jorgy Posted September 13, 2004 Newbies Posted September 13, 2004 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.
QuinTech Posted September 13, 2004 Posted September 13, 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
Newbies Jorgy Posted September 13, 2004 Author Newbies Posted September 13, 2004 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?
Newbies Jorgy Posted September 13, 2004 Author Newbies Posted September 13, 2004 I found that I left out the word Month in the formula. It works when I inserted this word.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now