January 31, 201213 yr I have a business that uploads large credit card batches for processing. We always have a couple hundred clients that have expired credit card dates on file with us. I'm trying to write a calculation that will compare today;s date (mmyyyy) with the expiration date (mmyyyy) of the credit card and flag those cards that have expired. The year portion is easy:I have a calculation field called C_Exp_Verify which looks like this = If (C_exp_Year < Current_Year; TextColor ("EXPIRED" ; RGB ( 255 ; 0 ; 0 ))) Now we are into 2012 and I want the calculation to flag credit card expiry dates for 1211 (December 2011) as well as 0112 (January 2012). I'm sure there is something simple I'm missing - I'm on my 4th venti latte and just can't come up with the solution. Any help is much appreciated!
January 31, 201213 yr Try = Let ( [ exp = Date ( Left ( Expiry ; 2 ) + 1 ; 0 ; 20 & Right ( Expiry ; 2 ) ) ] ; Get ( CurrentDate ) > exp ) where Expiry is a text field in "mmyy" format. This will return 1 (true) if the card has expired.
February 1, 201213 yr Author Perfect!!! Thank you so much!! You have made the world a little better place!
Create an account or sign in to comment