Jump to content
Server Maintenance This Week. ×

2 expiration dates


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

Recommended Posts

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

Link to comment
Share on other sites

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 ) )

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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