- Posts: 13
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
add day of the week to a question?
- andogro
- Topic Author
- Offline
- New Member
Less
More
9 years 1 month ago #116760
by andogro
add day of the week to a question? was created by andogro
Hello
I have a questionnaire that is sent out on different days to people. I want a question to say
In the past seven days, since last {day of week} did you....
I'm wondering if there is a way to get this dynamically? I know the date is captured as a field but is there a way to convert that to day of the week and insert? I also looked at the date/time question but did not see how to display as text ie Wednesday.
Thanks
Andy
I have a questionnaire that is sent out on different days to people. I want a question to say
In the past seven days, since last {day of week} did you....
I'm wondering if there is a way to get this dynamically? I know the date is captured as a field but is there a way to convert that to day of the week and insert? I also looked at the date/time question but did not see how to display as text ie Wednesday.
Thanks
Andy
The topic has been locked.
- aesteban
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 41
- Thank you received: 14
9 years 1 month ago #116768
by aesteban
Replied by aesteban on topic add day of the week to a question?
Have you tried
additional attributes
?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10612
- Thank you received: 3691
9 years 1 month ago - 9 years 1 month ago #116781
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic add day of the week to a question?
You can use the Expression Manager date() function to pipe in the current day of the week:
manual.limesurvey.org/Expression_Manager#Access_to_Functions
.
Code:
In the past seven days, since last {date('l')}, did you....
manual.limesurvey.org/Expression_Manager#Access_to_Functions
.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 9 years 1 month ago by tpartner.
The following user(s) said Thank You: andogro
The topic has been locked.
- andogro
- Topic Author
- Offline
- New Member
Less
More
- Posts: 13
- Thank you received: 0
9 years 1 month ago #116797
by andogro
Replied by andogro on topic add day of the week to a question?
Thanks Tony, worked perfectly.
The topic has been locked.