The code for current date is ${date://CurrentDate/Y%2Fm%2Fd}. Is there a code for the weekday of cur

MoncMonc Hong KongCommunity Member Qubie ✭

The code for current date is ${date://CurrentDate/Y%2Fm%2Fd}. Is there a code for the weekday of cur

The code for current date is ${date://CurrentDate/Y%2Fm%2Fd}. Is there a code for the weekday of current date (e.g. Saturday, Sat, 6), please?

Answers

  • bstrahinbstrahin Madison, WICommunity Member Wizard ✭✭✭✭✭
  • MoncMonc Hong KongCommunity Member Qubie ✭

    Thank you so much for your reply, @bstrahin. Actually I've already read before the link you provided. Do you mean: ${date://CurrentDate/Y%2Fm%2Fd%2FE}? It doesn't work on my survey page.

    I'd like to close the survey on Fridays and Saturdays. After searching the community, I found the following scripts to be put on the header under Look & Feel:

    <script>

    Qualtrics.SurveyEngine.addOnReady(function()

    {

    setTimeout(function(){

    var today = new Date();

    if(today.getDay() == 5 || today.getDay() == 6){

    jQuery("#NextButton").hide();

    alert("Your message to respondent");

    }

     }, 100);

    });

    </script>

    I'm not good at scripts. Is it possible to add some more scripts to close the window or direct to another URL after the respondent has clicked on the message, please?

Sign In to Comment