logical condition for time difference

  • adolfas.gelgota
    Asked on April 12, 2019 at 12:15 PM

    Hello JotForm, 


    I am making a form for bike rent reservation.

    I came up with a question regarding logical condition for value calculation. I want to make a price calculation based on booking duration. So if the booking is for 1-3 hours then its 10eur, if its from 4-12 hours then its 8,5 euros per hour. The problem is that I cannot choose IF Value is (range from-to). There is only way to choose from (equals, not equals, starts with, ends with, contains, does not contain, filled and empty).

    Is there a way to create a condition which would take the range of values into account?

    Best regards,

    Adolfas Gelgota


  • Richie JotForm Support
    Replied on April 12, 2019 at 2:07 PM

    I have checked your form and is it possible we use the Time field instead and use the range to get the booked hours?

    logical condition for time difference Image 1 Screenshot 40

    Screenshot:

    logical condition for time difference Image 2 Screenshot 51

    Then we use the Form calculation widget to get the value of the time so that we can use the condition greater than and less than.

    logical condition for time difference Image 3 Screenshot 62

    We can still use the Date Picker with time if you want, you can get the difference by using calculations.

    Here is a guide:https://www.jotform.com/help/443-Mastering-Date-and-Time-Calculation

    Please give it a try and let us know if you have further questions.