Datestamp in end URL?

More
3 years 2 months ago #131878 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?

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
3 years 2 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
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com
Want to use your survey offline -> www.offlinesurveys.com

Please Log in or Create an account to join the conversation.

More
3 years 2 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?

Please Log in or Create an account to join the conversation.

More
3 years 2 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
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com
Want to use your survey offline -> www.offlinesurveys.com

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!