daveealex Posted February 4, 2010 Posted February 4, 2010 Awhile back comment gave me this calculation to give me an expiration date on Jan 01 for some membership cards: Self≥Year ( Get (CurrentDate) ) ≤ Year ( Max ( expiration date::expire date ) ) This works perfectly, but now i need to add another expiration on top of it. The cards will have to expire 2 times now. The first date is Jan 01 and the second date is 6 months later on Jun 01(it is a six month grace period). I have been trying to get this to work: Self≥Year ( Get (CurrentDate) ) ≤ Year ( Max ( expiration date::expire date ) )+ Date ( Month ( expiration date::expire date ) + 6 ; Day ( expiration date::expire date ) ; Year ( expiration date::expire date ) ) After I add this to the conditional formating with the first calculation(both calculations) with a date of 01/01/2009 it is always red(the color for the grace period expiration.. It should be yellow(yellow is the color for Jan 01 expiration) because the date is not Jun 01 2010. The other thing is I need a way to search for the expired cards. With only the first calculation it is easy because it can be boolean. I search for a 1 or a 0. I am sure there is a way to do it but I can not figure it out. Thank you in advance David
comment Posted February 4, 2010 Posted February 4, 2010 Awhile back comment gave me this calculation to give me an expiration date on Jan 01 for some membership cards: Self≥Year ( Get (CurrentDate) ) ≤ Year ( Max ( expiration date::expire date ) ) No, I didn't. I suggested: Year ( Get(CurrentDate) ) ≤ Year ( Max ( Cards::IssuedDate ) ) http://fmforums.com/forum/showtopic.php?tid/212237/post/345322/#345322 now i need to add another expiration on top of it. The cards will have to expire 2 times now. The first date is Jan 01 and the second date is 6 months later on Jun 01 That could be: assuming 6 month later is actually July 1. Year ( Get(CurrentDate) ) ≤ Year ( Max ( Cards::IssuedDate ) ) and 6 < Month ( Max ( Cards::IssuedDate ) )
daveealex Posted February 5, 2010 Author Posted February 5, 2010 Yes you are 100% correct comment. I copied that out of a experimentation db. When i try the new calculation it automatically expires. With the 2 working in conjunction it goes red(second expiration color). Even with todays date as the issued date. I am not sure why? This card issue has been going on for 4 months. The past cards.fp7 that comment gave me was the 4th try to get this right. The client/friend just keeps changing his mind too much. Sorry to keep bugging.
comment Posted February 5, 2010 Posted February 5, 2010 I made a mistake in my previous post: I forgot that the expiration always occurs on Jan 1, with no regard to the actual issue date (month and day) of the card. See if this fits: Cards.fp7.zip
daveealex Posted February 5, 2010 Author Posted February 5, 2010 Thank you again comment, works perfectly. I am going to incorporate the cstatus from last time. This way it is still able to be searched. When I see how its done, it always seems so simple. Thanks again!!
bcooney Posted February 5, 2010 Posted February 5, 2010 "I made a mistake" omg, pigs must be flying somewhere!
Recommended Posts
This topic is 5496 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