How can I create a condition that is control by the current date and time ?

  • NISL_Soccer
    Asked on April 24, 2018 at 3:53 PM

    The condition should allow users to send it with out a charge if it happens in 5 days prior to the day of current. (date)

    The Problem is that goes by days, so if the new date of the game is on the 5 game by the date it will charge the fine.

    E.g 4/24/2018 change to 4/29/18 will trigger my fee field. but if the form is fill at 2 pm and the game is at 4 pm on the date of 4/29/18 technically its ok. (120 Hours)

    This are my current conditions: 

    1524600756Condition 1 Screenshot 101524600768Condition 2 Screenshot 21

     

     

  • Victoria_K
    Replied on April 24, 2018 at 6:02 PM

    Hello,

    Unfortunately, I am not sure if I understand the exact requirements for your conditions to provide a solution, but I can suggest to check the time along with "today+5". 

    You can set the VALUE checked as "today + 5 02:00".

    Please provide us an example so we could search for possible solutions, if my suggestion does not help.

    Thank you.

  • NISL_Soccer
    Replied on April 25, 2018 at 12:29 PM

    Thank you for answering my question, I did provide an example.

    E.g 4/24/2018 change to 4/29/18 will trigger my fee field. but if the form is fill at 2 pm and the game is at 4 pm on the date of 4/29/18 technically its ok. (120 Hours)'

    Can we have the exeption instead of by day by hours? 120 hours equals 5 days. 

  • David JotForm Support
    Replied on April 25, 2018 at 1:53 PM

    I believe I am understanding your requirements correctly.  What could be done is to use two date/time fields.  One with a default date/time of current and one conditionally updated to today +5:

    1524678709Capture Screenshot 10

    This would give the second field a date of 5 days in the future, but a time of the current time.  You could then use the updated field in your conditions, allowing for checking if the date/time is before the field value, rather than just checking for the date+5.

  • NISL_Soccer
    Replied on April 25, 2018 at 10:47 PM

    Yes, that is what I need. I tried to create the condition but it seems that it did not work.

    Should I add time field?

    I don't think I am understanding, sorry I never feel so inadequate...

  • Scott JotForm Developer
    Replied on April 26, 2018 at 3:25 AM

    Yep, you need to able the time field also to keep track of the current time:

    1524727500Screen Shot 2018 04 26 at 10 Screenshot 10

    Otherwise, everything looks in order as it was advised by my colleague David.