Welcome to the LimeSurvey Community Forum

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

Piping of date selected in previous question

  • vzyldd
  • vzyldd's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 4 months ago #244358 by vzyldd
Please help us help you and fill where relevant:
Your LimeSurvey version:  LimeSurvey Community Edition   Version 5.4.15+221212
Own server or LimeSurvey hosting: Own
Survey theme/template: Fruity
==================
I need help please.
I need to display the full date (e.g. Wednesday, 1999/12/02) in a text display question piped from a previous date/time question.

Q1. Select the transaction date
Q2. Confirm that [date selected in Q1] is correct

I can pipe the date selected [ {q1.shown] } but how do I include the day of week within this?
Attachments:

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 4 months ago #244359 by Joffm
First create a UNIX timestamp with "strtotime(q1)"
then use the "date" function with your desired format,
like
{date('l, Y/m/d',strtotime(q1))}

Read the manual about "implemented functions"

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • vzyldd
  • vzyldd's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 4 months ago #244360 by vzyldd
Big thank you Joffm. Works perfect.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose