- Posts: 22
- Thank you received: 6
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
validate date/time entries
- mfaber
- Topic Author
- Offline
- Junior Member
Less
More
11 years 3 months ago #91296
by mfaber
validate date/time entries was created by mfaber
Basically, i want the participants to be allowed only to enter dates between december 10, 2012 and december 24, 2012. Unfortunately there are no minimum/maximum fields for the date question.
How can I use expression manager to check if a entered date is smaller or larger than a given date? Are there any examples I could have a look at?
Any help appreciated!
How can I use expression manager to check if a entered date is smaller or larger than a given date? Are there any examples I could have a look at?
Any help appreciated!
The topic has been locked.
- pvdemael
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 0
9 years 7 months ago #111914
by pvdemael
Replied by pvdemael on topic validate date/time entries
boosting this one up.
Can someone help us on this one?
Thx
Can someone help us on this one?
Thx
The topic has been locked.
- mfaber
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 22
- Thank you received: 6
9 years 7 months ago #111921
by mfaber
Replied by mfaber on topic validate date/time entries
This has been implemented in version 2.05.
You'll find min max fields in the advanced question attributes of the date question. Have a look in the manual for details.
Regards,
M
You'll find min max fields in the advanced question attributes of the date question. Have a look in the manual for details.
Regards,
M
The topic has been locked.
- pvdemael
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 0
9 years 7 months ago #111924
by pvdemael
Replied by pvdemael on topic validate date/time entries
Had to make myself more clear, sorry.
I would like to calculate the minimum and maximum dates.
If someone gives his date of birth and I want to know how long someone has lived in a city, I don't want them to be able to pass a date before their dob or after today.
I would like to calculate the minimum and maximum dates.
If someone gives his date of birth and I want to know how long someone has lived in a city, I don't want them to be able to pass a date before their dob or after today.
The topic has been locked.
- mfaber
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 22
- Thank you received: 6
9 years 7 months ago #111929
by mfaber
Replied by mfaber on topic validate date/time entries
Try the following: in the datemin field put your questioncode of the question that asks for the date of birth. Eg. Dob
In the maxdate field put:date("Y-m-d H:i",strtotime("now"))
It should do the trick.
Please also have a look at: manual.limesurvey.org/Question_type_-_Date for more what you can do with dates and EM in ls 2.05
In the maxdate field put:date("Y-m-d H:i",strtotime("now"))
It should do the trick.
Please also have a look at: manual.limesurvey.org/Question_type_-_Date for more what you can do with dates and EM in ls 2.05
The following user(s) said Thank You: pvdemael
The topic has been locked.