Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: validate date/time entries

validate date/time entries 1 Jahr 7 Monate her #91296

  • mfaber
  • mfabers Avatar
  • OFFLINE
  • Expert Lime
  • Beiträge: 85
  • Dank erhalten: 22
  • Karma: 4
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!
Der Administrator hat öffentliche Schreibrechte deaktiviert.

validate date/time entries 6 Tage 14 Stunden her #111914

  • pvdemael
  • pvdemaels Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 4
  • Karma: 0
boosting this one up.
Can someone help us on this one?
Thx
Der Administrator hat öffentliche Schreibrechte deaktiviert.

validate date/time entries 6 Tage 12 Stunden her #111921

  • mfaber
  • mfabers Avatar
  • OFFLINE
  • Expert Lime
  • Beiträge: 85
  • Dank erhalten: 22
  • Karma: 4
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
Der Administrator hat öffentliche Schreibrechte deaktiviert.

validate date/time entries 6 Tage 11 Stunden her #111924

  • pvdemael
  • pvdemaels Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 4
  • Karma: 0
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.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

validate date/time entries 6 Tage 11 Stunden her #111929

  • mfaber
  • mfabers Avatar
  • OFFLINE
  • Expert Lime
  • Beiträge: 85
  • Dank erhalten: 22
  • Karma: 4
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
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: pvdemael
Moderatoren: ITEd
Ladezeit der Seite: 0.131 Sekunden
Donation Image