Welcome to the LimeSurvey Community Forum

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

Maxdate and Mindate function to check current date (today)

  • plafeber
  • plafeber's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 7 months ago #204246 by plafeber
Hello all,
This is my first post, so some courtesy is asked. I have a question of Date format asking "When did you..." which means the date cannot be in the future. Looking everywhere in the manuals, I have learned about conditions, ExpressionScript, implemented functions, but nowhere a function to look up the current date, the date of today.
Is such a function supported? Would you know the syntax? How for instance would I set Maxdate to a comparison that checks that the date entered is before (smaller than) the date of today?
Thank you in advance for your replies.
The topic has been locked.
More
3 years 7 months ago #204252 by jelo
Take a look at this example to see the handling of today in ExpressScript

manual.limesurvey.org/ExpressionScript_e...ce_between_two_dates

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 7 months ago #204254 by Joffm
Set
maximum date: "now"

As described in the manual
manual.limesurvey.org/Question_type_-_Da..._date_.28date_max.29

...
Any English string : "now", "-10 years", "tomorrow";
...







Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: plafeber
The topic has been locked.
  • plafeber
  • plafeber's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 7 months ago #204261 by plafeber
Sometimes it's just very easy. Thank you for this. I must have overlooked this.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose