Question Logic Based on Time of Day



Is there a way to have a question appear only after a certain time of day?  I have a question that I only want to appear if a respondent happens to be answering the questions after 5:30 PM.



Adam answered
    Adam 18 Rep.

    Thanks Jim.  You’ve been very helpful.  This particular survey doesn’t run much longer, so I won’t pursue any custom scripting at this time, but now I know for the future.


    Thanks again,


    Adam answered

      Hi Adam,

      There is no standard logic function that will allow you to create a condition based on time.  If your account allows it, you will have to create a custom script to do this.

      The first step would be to create a hidden text-box question that has the merge code for system time as the default answer (

      You would then need a custom script that would read the answer to the hidden question (sgapiGetValue).  It might be necessary to add a PHP conversion function to convert the response into a usable format.  The script would then use an IF/ELSE statement to evaluate the time, and if the desired condition is met it would change the HIDE condition of your post-5:30 question (sgapiHideQuestion).

      Are all of your respondents in the same time zone?  The merge code for time will return the value for your account setting, not your respondent’s time zone.

      SurveyGizmo offers programming services if you do not have in-house resources that can build this type of custom script.

      Good luck!

      Jim W (Moderator) answered


        Question stats

        • Active
        • Views4027 times
        • Answers2 answers
        • Followers2 followers