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
  • andogro's Avatar Topic Author
  • Offline
  • New Member
  • New Member
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
The topic has been locked.
  • aesteban
  • aesteban's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
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
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 1 month ago - 9 years 1 month ago #116781 by tpartner
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:

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
  • andogro's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
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.

Lime-years ahead

Online-surveys for every purse and purpose