Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Adding the submit time and date into basic admin notification emails

  • bruce78
  • bruce78's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 3 months ago #162247 by bruce78
I am trying to include the time and date of submission into basic admin notification emails.

At the moment, the code below gives me the correct date, but the time is always listed as 7.01 or 1.01 or similar which doesn't match the actual time the respondent completed the survey....

Date of Submission
<br>
{date("d-F-Y h:m")}


Does anyone know what I'm doing wrong? Thanks!
The topic has been locked.
More
6 years 3 months ago - 6 years 3 months ago #162274 by steve_81
Hi bruce78,
Code:
{date("d-F-Y H:i")}
should do the trick. BTW: I don't know why its an i for the minutes ;-)

PS: It follows this format and syntax php-function-date
Last edit: 6 years 3 months ago by steve_81. Reason: Adding Link
The following user(s) said Thank You: bruce78
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 3 months ago #162278 by tpartner

BTW: I don't know why its an i for the minutes

I suspect it's because they want to keep it to single characters and both lower and uppercase m are used for month so they simply used the first unused character.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • bruce78
  • bruce78's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 3 months ago #162392 by bruce78

steve_81 wrote:

Code:
{date("d-F-Y H:i")}
should do the trick.


Perfect, that worked a charm... thank you!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose