Welcome, Guest
Username: Password: Remember me

TOPIC: Formatted expiration date in invitation/reminder emails?

Formatted expiration date in invitation/reminder emails? 7 months 22 hours ago #105433

  • rmenezes
  • rmenezes's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Greetings.

I'd like to send invitation/reminder emails with the surveys expiration date. If I use the {EXPIRY} placeholder it works - but it displays a plain date string (e.g. '2014-03-31 00:00:00'). Not too friendly. I tried to EM-ify it by using something like:

{date('j de F',time(strtotime(EXPIRY)))}

But it didn't work. Any ideas? TIA.

Peace.
The administrator has disabled public write access.

Formatted expiration date in invitation/reminder emails? 6 months 4 weeks ago #105448

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4195
  • Thank you received: 789
  • Karma: 359
Well, it seems you've found a bug. The date() function works in questions but not in email templates. I've submitted a report - bugs.limesurvey.org/view.php?id=8752.

Additionally, you will need to escape a couple of characters in your expression as they are date formats:
{date('j \d\e F', strtotime(EXPIRY))}


.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 6 months 4 weeks ago by tpartner.
The administrator has disabled public write access.
The following user(s) said Thank You: rmenezes

Formatted expiration date in invitation/reminder emails? 6 months 4 weeks ago #105510

  • rmenezes
  • rmenezes's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
tpartner wrote:
Well, it seems you've found a bug. The date() function works in questions but not in email templates. I've submitted a report - bugs.limesurvey.org/view.php?id=8752.

Additionally, you will need to escape a couple of characters in your expression as they are date formats:
{date('j \d\e F', strtotime(EXPIRY))}


.

All right. Let the old swatter have some action then. Thanks for the character escaping hint.

Peace.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.254 seconds
Donation Image