- Posts: 21
- Thank you received: 1
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
- Topic Author
- Offline
- Junior Member
Less
More
3 years 7 months ago #204246
by plafeber
Maxdate and Mindate function to check current date (today) was created 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.
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.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
3 years 7 months ago #204252
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Maxdate and Mindate function to check current date (today)
Take a look at this example to see the handling of today in ExpressScript
manual.limesurvey.org/ExpressionScript_e...ce_between_two_dates
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12888
- Thank you received: 3965
3 years 7 months ago #204254
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Maxdate and Mindate function to check current date (today)
Set
maximum date: "now"
As described in the manual
manual.limesurvey.org/Question_type_-_Da..._date_.28date_max.29
Joffm
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
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 21
- Thank you received: 1
3 years 7 months ago #204261
by plafeber
Replied by plafeber on topic Maxdate and Mindate function to check current date (today)
Sometimes it's just very easy. Thank you for this. I must have overlooked this.
The topic has been locked.