I need to add an expiry date (6 months from the date someone filled in the survey) in the email action. Any ideas?
You could script this fairly easily! Here’s a little something to get you started:
%%currentTime = sgapiEvaluateMergeCodes(‘[system(“time”)]’); //get system time
%%currentTime = sgapiStrToTime(%%currentTime); //convert to unix time stamp
%%currentTime = %%currentTime + 15770000; //add 15770000 seconds (6 months)
%%format = ‘m-d-Y h:i A’; //format = 01-13-2016 4:58 PM
%%currentTime = sgapiDate(%%format,%%currentTime); //put everything back together
sgapiSetValue(5, %%currentTime); //store in hidden value (change ID as necessary)
Keep in mind the community editor messes up quotation marks sometimes, so you may have to manually delete and re-add those.
No worries, Nathan. Thanks for your contribution 🙂
Ah, I re-read the title of your question and now it makes sense! It seems that you wish to display this future “expiry” date inside the body of your email. I’m afraid I am not aware of any built-in features that will allow you to accomplish this 🙁 If I’ve overlooked some possible solution, hopefully someone else will step in and add their two cents!
Hello! I’m unsure what you mean by expiry date – do you want to delay the email? If so, this can be done by editing your Send Email action, and going to the Advanced tab, where you’ll find the Time Delay field. More details can be found in the helpful tutorial below: If I misunderstood, please feel free to clarify your question and I’d be happy to give another try at answering it I hope this helps!