I'm trying to calculate a custom date on the receipt for use with a coupon. ex: "Coupon valid until MM/DD/YYYY".
Transaction.Date + 7 doesn't work.
Anyone know how to accomplish this in XML?
*This post is locked for comments
I'm trying to calculate a custom date on the receipt for use with a coupon. ex: "Coupon valid until MM/DD/YYYY".
Transaction.Date + 7 doesn't work.
Anyone know how to accomplish this in XML?
*This post is locked for comments
were you able to get to the bottom of this ?
try to wrap the date in CDate. like so: CDate(Transaction.Date + no of days).
I havent tested this, but this is how vb and vba convert strings to dates.
Hi Antonijo Todorovik Dimiskov,
I have tried to simply do Transaction.Date + no of days and it half works but it isn't formatted as a date.
E.g TodaysDate + 30 is displaying 42256 which if you do this in Excel and copy the date to a text field you get the same number, is there a way to format this back to a Date within the Receipt?
Many Thanks
Hi Antonijo
Yes this is exchange date calculated from the transaction date as mention on the first post.
We need show the exchange date as 30 days from transaction date in the receipt.
Can you be more specific, please? Is this Exchange date an exact date caluclated from the transaction date?? Is it only descriptive information or something more?
Regards, A.
Hi ,
Has anyone able to achieve this without creating a session variable?
We have a requirement to add Exchange date in the receipt
Thanks
Hi Sportsman,
You can try two things:
- first, try defining a varibale with the <SET> function, something like
"<SET name="Var1" type="VbDateTime"></SET> Then when using the variable You can try what You say
<SET name="Var1" type="VbDateTime"> Transaction.Date + 7 </SET> or
<SET name="Var1" type="VbDateTime"> Transaction.Date & 7 </SET> or similar ... , but not sure if it will work...
- second option, this I know it works, as I have done it before, is to use one of the 10 Session Variables. You need to develop a small DLL, that will be hooked up just before posting the transaction. The DLL could be developed in Visual Studio as a COM object, you can just add 7 days to a Transaction.Date into a new variable that You assign to the Session Variable that You print out on the receipt....
Contact me if You need help, regards, A.
André Arnaud de Cal... 291,431 Super User 2024 Season 2
Martin Dráb 230,503 Most Valuable Professional
nmaenpaa 101,156