Check out the LimeSurvey source code on GitHub!

expiration date in invitation mail (expression manager)

4 years 3 months ago - 4 years 3 months ago #86338 by fransmarcelissen
In my invitation mails I want to display the expiration date. Standard this date is displayed with {EXPIRY} as 2012-10-22 00:00:00
I only want to display the date part. In the survey itself this is possible with {substr(EXPIRY,0,10)} This does not work in de mail, however. Then the result is a message like <span style='background-color: #eee8aa;'><span title='Return a part of the text; string substr(string, start [, length])' style='color: blue; font-weight: bold'>substr</span>(<span title='Unknown variable' style='border-style: solid; border-width: 2px; border-color: red;'><span title='Unknown variabele' style='color: red; font-weight: bold'>EXPIRY</span></span>, 0, 10)</span>

Is it possible to display the date part in an invitation mail?
Thanks for your help.
Last Edit: 4 years 3 months ago by fransmarcelissen.

Please Log in to join the conversation.

4 years 3 months ago #86581 by fransmarcelissen
I did not receive any response on my question. I'm glad I found a solution by myself.
In the mail the expiration date should be entered as {substr("{EXPIRY}",0,10)} Now only the first 10 characters of {EXPIRY} are displayed.
If the expiration date is displayed in the survey itself, {EXPIRY} is displayed als a date only. But if you want to extract a substring in the survey, it should be entered as {substr(EXPIRY,0,10)}
Is this difference between mail and survey intended behaviour of a bug?

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form