Trying to set conditions based on both date and time

  • Profile Image
    afcpool
    Asked on June 16, 2020 at 08:11 AM

    I would like certain fields visible either for a specific 24 hours-- from 8pm one day to 8pm the next day, based on the form date and time. I can see how to do date, but I can't seem how to get time in, too.

    That is, I would like this (screenshot) to be from 8pm on the 15th to 8pm on the 16th.

  • Profile Image
    Bert_A
    Answered on June 16, 2020 at 10:01 AM

    Hi there,

    Thank you for reaching out.

    I'd suggest you try "Is Equal To" the date targeted instead of "before and after". 




    Please let me know how it goes.

  • Profile Image
    afcpool
    Answered on June 16, 2020 at 10:27 AM

    The trick is that I want these fields showing up four hours before that date -- we are trying to open some registrations at 8 pm before the date showing, not at midnight.

  • Profile Image
    Bert_A
    Answered on June 16, 2020 at 12:45 PM

    Hi,

    I had to look at this further, it appears that the time which is the data that you need to add in the condition in order to meet the "4 hours" before the date is not being recognized in the "Date" field. So what I can suggest is you add a separate time field, we have a time picker that you can add and then add it in the condition logic similar to the one showing in the screen shot.



    Let me know how it goes.

  • Profile Image
    afcpool
    Answered on June 16, 2020 at 01:50 PM

    Thanks, but that didn't work, but I have figured out a solution. I have created date pickers with set time for each day of the week, and have a form calculation subtracting current date and time from that date, and then set conditions based on whether that calculation is less than 0 today (start) and greater than 0 tomorrow (end).

  • Profile Image
    Eduardo_H
    Answered on June 16, 2020 at 05:17 PM

    Your workaround seems like a great solution. Thank you for sharing this.


    Since your form uses scheduling, you might be interested in checking our new Appointment field:

    Blog Post: How-to-schedule-an-appointment


    Let us know if we can help with anything else.