This script will pipe in a date either from another date question or the current date in the text of any question in your survey.
Detailed Steps
- Find and copy the appropriate script from below.
- If you want to show the current date when participants see the question, look at scripts in the Today's date column.
- If you want to pipe in a date from a date question, look at scripts in the From a date question column
- Select the question in the Questionnaire Tree.
- Paste the script into the question text or answer text.
- If you want to pipe in a date from a date question, change Q_DATE to the name of the date question in your study.
- Click Save.
- Validate and test your survey.
Scripts to place in date from another Date question
Example date format | From a date question |
---|---|
13/06/2016 |
[%(Q_DATE.DateTimeValue.ToString("dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture))%]
|
2016-06-13 |
[%(Q_DATE.DateTimeValue.ToShortDateString())%]
|
06-13-2016 |
[%(Q_DATE.DateTimeValue.ToString("MM-dd-yyyy"))%]
|
Jun 13,2016 |
[%(Q_DATE.DateTimeValue.ToString("MMM dd, yyyy"))%]
|
June 13,2016 |
[%(Q_DATE.DateTimeValue.ToString("MMMM dd, yyyy"))%]
|
Monday 13 June, 2016 |
[%(Q_DATE.DateTimeValue.ToString("dddd dd MMMM, yyyy"))%]
|
Scripts to place in Today's Date
Example date format | Today's date |
---|---|
13/06/2016 |
[%(DateTime.Now.ToString("dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture))%] |
2016-06-13 |
[%(DateTime.Now.ToShortDateString())%] |
06-13-2016 |
[%(DateTime.Now.ToString("MM-dd-yyyy"))%] |
Jun 13,2016 |
[%(DateTime.Now.ToString("MMM dd, yyyy"))%] |
June 13,2016 |
[%(DateTime.Now.ToString("MMMM dd, yyyy"))%] |
Monday 13 June, 2016 |
[%(DateTime.Now.ToString("dddd dd MMMM, yyyy"))%] |
More Information
Read this WebHelp article to learn more about Date question.
Comments
0 comments
Article is closed for comments.