Hello,
I am putting together a new receipt format for our Gift Certificates. I would like to add a data element for expiration date. The expiration date should be one year from the original sales date of the gift certificate.
There is a data element called GC Original Date which works great for printing the original date of issue, but how do I now add one year to that date and then print it on the ticket? Is there a way to sneak code into the Mask format that will allow me to adjust the date by a year?
This is for printing to the ticket printer. Once I get this figured out I will move on to the form design to print the same information with Gift Certificate Batch Printing report.
Thanks in advance for your help!
Hi Jared,
We use the GC Original Date data element and then use the following mask to calculate the 1 year expiry date.
String(date(val), 'mm/dd') + '/' + String(year(date(val))+1)
Thank you, everyone, for all of the great input. I have entered the masking provided by Michele and it works perfectly.
Todd, thank you for making the reminder for everyone to check local laws. This is important because the rules can get very specific, and they can change from year to year.