Welcome to the LimeSurvey Community Forum

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

Datestamp in end URL?

  • stbrunee
  • stbrunee's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 4 months ago #131878 by stbrunee
Datestamp in end URL? was created by stbrunee
I was wondering if it is possible to add the datestamp of a survey to the end URL? According to the manual, it is possible with question fields by using e.g. {INSERTANS:1234X56X7}. For the datestamp, I tried to be smart and do it a similar way, e.g.:

www.limesurvey.org/test.php?datestamp={INSERTANS:datestamp } (datestamp is the name of the field in the database)

This fails however... is there another way to achieve this?
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 4 months ago #131882 by Mazi
Replied by Mazi on topic Datestamp in end URL?
You either have to use syntax {INSERTANS:1234X56X7} where:
12345 = survey ID
56 = group ID
7 = question ID

...or you use the question code instead, e.g. if the question code of the date question is "dob" use: {dob.NAOK}.

Best regards/Beste Grüße,
Dr. Marcel Minke
survey-consulting.com
offlinesurveys.com
Feel free to contact me by email for professional LimeSurvey support!
The topic has been locked.
  • stbrunee
  • stbrunee's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 4 months ago #131883 by stbrunee
Replied by stbrunee on topic Datestamp in end URL?
Well, that's the thing, the datestamp isn't a question. I was referring to the "Date stamp?" option under Survey settings -> notification & data management, which gives "Responses will be date stamped". This adds the extra 'datestamp' field in the database table structure.

According to your reply, this isn't possible if I understand correctly?
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 4 months ago #131891 by Mazi
Replied by Mazi on topic Datestamp in end URL?
Ahh, so you are talking about the default "submitdate" value. That's not possible (and will also be a problem because anonymous surveys use a fake datestamp).

But if it is just about adding the current datestampt to the end URL, simply use this:
{date("Y-m-d")}
OR
{date("Y-m-d H:is")}

...and it will add the current date/time.

Best regards/Beste Grüße,
Dr. Marcel Minke
survey-consulting.com
offlinesurveys.com
Feel free to contact me by email for professional LimeSurvey support!
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose