Welcome to the LimeSurvey Community Forum

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

Question in (current) date format

More
10 years 16 hours ago #142692 by hanwerts
I want to program a question in date format in which I want to know when the user started a course. This in itself is an easy task. I use the drop down option in which the user can enter the full date or select day, month and year from a calendar.

I would like to compare the input from the user to a predefined date. The latter one is dynamic, i.e. it should be the current date, so it will change every day. I came up with the idea that the current date will be set using a hidden question which precedes the date question presented to the user.

How can I set the current date in a hidden question and use it in the next date question? And how can I validate that the input from the user will be in the past (i.e. lower than current date from the hidden question)?
The topic has been locked.
More
10 years 15 hours ago #142696 by jelo

hanwerts wrote: How can I set the current date in a hidden question and use it in the next date question?

{date('Y-m-d')} should work in a equation question.

You might calculate differences in e.g days and compare them.
www.limesurvey-consulting.com/how-to-cal...nd-the-current-date/

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
Moderators: tpartner, holch

Lime-years ahead

Online-surveys for every purse and purpose