Populating Future Dates

Sometimes you may want to use future dates as text based on when the respondent is taking a survey. For example, a survey to collect a respondent’s availability for an advising appointment would need to list future dates, based on the date that the survey is being completed.

You can use this Qualtrics trick to display a range of future dates based on the calendar (e.g. if it’s Thursday, show respondents dates for Friday, Saturday, Sunday, and Monday) or based on business days (i.e. if it’s Wednesday, show men the next four business days of Thursday Friday, Monday and Tuesday). Both options are described below.

Option 1: Displaying Future Dates, including Saturday and Sunday

First, we will set up an embedded data label to tell Qualtrics what “today” is.

  • Go into Survey Flow
  • Add an Embedded Data at the start of your survey, before any question blocks.
    • Embedded Data Field: Enter “TODAY”.
    • Click Set Value Now. Click the blue/white drop-down arrow. Choose Insert Piped TextDate / Time → Current Date / Time → Choose the option which displays the date the way you want to use it. (Example: Monday, April 23).
    • When selected, the following code will be populated into the field: ${date://CurrentDate/DM}

Next, decide which future dates you need. Do you just need to show the next three days after the current date? Do you need a date fifteen dates after the current date? You will enter an Embedded Data Field for whichever future dates you need. In this example, we want to tomorrow, including Saturdays and Sundays.

  • In the same Embedded Data Element, click Add a New Field below your Today embedded data label.
  • Embedded Data Field: Enter a code that makes sense to you. For example, for tomorrow, we used TODAYPLUS1
  • Click Set Value Now. Click the blue/white drop-down arrow. Choose Insert Piped TextDate / Time → Other Date → Tomorrow. Choose the option which displays the day of the week. (Example: Tuesday April 22).
  • When selected, the following code will be populated into the field: ${date://OtherDate/FL/+1%20day}

The red highlighted text in the code tells Qualtrics that this value is today plus one day, or tomorrow. This logic can be used to tell Qualtrics how many days from today to define this field. For example, if you wanted to use a date that is fifteen days from today, you would set up an embedded data field of TODAYPLUS15 and use the code as ${date://OtherDate/FL/+15%20day}

As another example, here is how we would set up the next five days after today as future dates”

Keep in mind that these days go by the full weekly calendar. If you want to exclude Saturdays and Sundays, you will need to do some extra steps This is detailed in Option 2 …

Option 2: Displaying Future Dates, EXCLUDING Saturday and Sunday

We begin the same ways as we did in Option 1: we will set up an embedded data label to tell Qualtrics what “today” is.

  • Go into Survey Flow
  • Add an Embedded Data at the start of your survey, before any question blocks.
    • Embedded Data Field: Enter “TODAY”.
    • Click Set Value Now. Click the blue/white drop-down arrow. Choose Insert Piped TextDate / Time → Current Date / Time → Choose the option which displays the date the way you want to use it. Your choice must include the name of the day. (Example: Monday, April 23).
    • When selected, the following code will be populated into the field: ${date://CurrentDate/DM}

Next, decide which future dates you need. In this example, we want to include the next five days, excluding Saturdays and Sundays. In order to do this, we need to tell Qualtrics which are the dates for the next five business days, based on the day the survey is being filled out. For example, if the survey is filled out on a Monday, the next five days will be Tuesday, Wednesday, Thursday, Friday and (skipping Saturday and Sunday) the following Monday. We will use both Branch Logic elements and Embedded Data elements to tell Qualtrics what to do.

Let’s start with setting up the elements for responses entered on a Monday.

  • Under the Today Embedded Data element, click Add Below and choose Branch.
  • Click Add a Condition. Set up the condition as Embedded Data. Type TODAY as the embedded data label to check. Choose the filter as Contains. Type Monday as the condition. Click OK.
  • Under the branch logic, click Add A New Element Here. Select Embedded Data.
  • Think about the logic for a survey completed on Monday.  The next five days will be Tuesday, Wednesday, Thursday, Friday and (skipping Saturday and Sunday) the following Monday. This means we need to tell Qualtrics how many calendar days away from Monday should be used to define each of these. For the first four, that’s easy! Tuesday is 1 day after Monday, Wednesday is 2 days after Wednesday, etc. However, the following Monday is 7 days after the current Monday.
  • Using that logic, add the following embedded data labels below the Branch element for Monday:
    • TODAYPLUS1 → ${date://OtherDate/DM/+1%20day}
    • TODAYPLUS2 → ${date://OtherDate/DM/+2%20day}
    • TODAYPLUS3 → ${date://OtherDate/DM/+3%20day}
    • TODAYPLUS4 → ${date://OtherDate/DM/+4%20day}
    • TODAYPLUS5 → ${date://OtherDate/DM/+7%20day}
    • Notice that the final date skips +5 (Saturday) and +6 (Sunday) to show the fifth-day option as the following Monday.

Great! Now, repeat this set-up for each day of the week (Tuesday – Sunday). We need to do this for each separate day because the logic of how to skip Saturday and Sunday varies by the current day of the week. To set up your survey to always skip Saturday and Sunday appropriately, you have to set up a branch logic for every day of the week and adjust the “+n” accordingly. One way to save time is to duplicate the Branch Logic and Embedded Data elements for Monday and update it for Tuesday. Here is an example of how the rest of the dates each week can be set up:

Additional Day Set-Up

Inserting Embedded Data Fields Into Survey Questions or Email Triggers

You can now insert these embedded data fields into future questions in the survey and the respondent will see the corresponding “tomorrow” dates displayed as their options. For example, if today is Sunday, July 31, these dates would display to the survey respondent as Monday, August 1; Tuesday, August 2; Wednesday, August 3, etc.

First, ensure that all of the survey’s questions blocks fall AFTER the embedded data elements (and branch logic, if skipping Saturdays and Sundays) in the Survey Logic. Since you need the survey to capture this embedded data before using them in any questions, these elements need to be in the survey before the survey questions.

Next, use piped text to include embedded data fields in any survey questions or in email triggers. For example, here is a survey question that asks the respondent to indicate their availability for the future dates established.

When the student takes this survey, instead of seeing this code, they will see the future dates based on when they take the survey. (Monday April 23, Tuesday April 24, etc.)

You can also use future dates in email tiggers, such as alerting a student when to expect a response to a request based on when they submit it. (Five days out, etc.)