Use DATE and TIME in display logic to start a survey | XM Community
Skip to main content
Question

Use DATE and TIME in display logic to start a survey

  • September 10, 2023
  • 3 replies
  • 318 views

Forum|alt.badge.img+4

Hello,

I have a Quiz Game that must be open during a specific day and time, let’s say on Monday 15 sep between 08:00 and 17:00.

And I would like to display a nice block (before the starting date and time) to customise the built-in

“Sorry, this has not started”

 

Therefore, I have a display logic that works well for the day (date) using the embedded data below:

Formatteddate = ${date://CurrentDate/Y}${date://CurrentDate/m}${date://CurrentDate/d}

 

But I am struggling and need help for the TIME display logic ?

For TIME, can i use the same principle (as for date) with something like that (which is not working for the moment):

Formattedtime = ${date://CurrentTime/HH}${date://CurrentTime/MM}

 

Thanks guys for your help,

Gilles

3 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6083 replies
  • September 10, 2023

Have you tried using just military time: ${date://CurrentTime/MT}?


Nam Nguyen
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+29
  • QPN Level 8 ●●●●●●●●
  • 1096 replies
  • September 10, 2023

@Gilles I understand your concern but time in your case doesn’t have to be in number format to be compared properly like the date. TomG answer is perfect with you, just throw in the basic logic, greater than 08:00, less than 17:00.
@TomG Just out of curious, in Qualtrics can we pipe out the hours and minutes individually like what this guy want?


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6083 replies
  • September 10, 2023

@TomG Just out of curious, in Qualtrics can we pipe out the hours and minutes individually like what this guy want?

Not that I’m aware of.  The date/time piping used by Qualtrics doesn’t adhere to any standard I’ve been able to to identify (e.g., php), and the various time pipes don’t really yield any clues.