Display logic for birthday date | XM Community
Skip to main content
Solved

Display logic for birthday date

  • July 23, 2023
  • 2 replies
  • 291 views

Forum|alt.badge.img+3

Hi everyone!

 

I have some questions on my survey that I only want them to appear to people who were born before 09/11/1983 (day, month, year). I tried to use “add display logic” butom in those questions but it´s not working correctly. I also tried to change the “birthday question” to some formats to see if any worked. Does someone have a sugestion?

Thank you!!
 

Best answer by SaurabhPujare_Ugam

Hi @aribeiro,

I would first recommend you to find the difference between the 2 dates, i.e., current date and your target date, for which you can refer to link for further details.

And use the variable created through JS as a display logic.

2 replies

rgupta15
Level 4 ●●●●
Forum|alt.badge.img+8
  • Level 4 ●●●●
  • 92 replies
  • July 23, 2023

Why don’t you calculate age from that period of time using day, month & year and then add display logic using the number and skip if does not satisfy.


SaurabhPujare_Ugam
QPN Level 5 ●●●●●
Forum|alt.badge.img+18
  • QPN Level 5 ●●●●●
  • 145 replies
  • Answer
  • July 24, 2023

Hi @aribeiro,

I would first recommend you to find the difference between the 2 dates, i.e., current date and your target date, for which you can refer to link for further details.

And use the variable created through JS as a display logic.