# Make changes to quantity only when

Hi everyone,

I’m looking to change my product’s quantity only the days it’s rented. Suppose I have 40 chairs but rented 25 on Sunday. I want only 15 chairs available to show those days.

Here’s what makes logical sense in my head but I’m obviously not doing it right.

Any thoughts or ideas?

Current date time: Extract Date: (05/19/2023) IS Date Time Picker A’s Value (05/19/2024) <-Range-> Date Time Picker B’s Value (05/20/2023)

So essentially you have 05/19/2023 = 05/19/2023 To 05/20/2023.

It’s a yes/no to a date range. That’s why the condition is failing

To expand on what @bcart0v said, your only when condition is not valid, as you’re mixign up types, and therefore it can not be evaluated to a yes/no.

You’re trying to compare a single number to a date-range - which obviously makes no sense.

i.e. `Current date/time: extract date` gives you a number : 19

the rest of your expression creates a date range from two dates (the value of date/time picker A to the value of date/time picker B - for example 18th May 2023, 10:30am to 22nd May 2023, 5:15pm)

So, you’re saying ‘only run this action when the number 19 IS the date range of 18th May 2023, 10:30am - 22nd May 2023, 5:15pm’… (as an example)

which obviously makes no sense, and can’t be evaluated to a yes/no - so is not a valid condition.

From what you’ve described, I can’t quite work out what your trying to do with the condition?

What exactly are you trying to ahceive with it?

I’d like for the quantity to only be affected the time it’s booked. Lets say I have 40 tables total in my inventory but book 10 tables on May 25th. I want when other users want to book on the 25th only 30 tables show in the inventory.

I hope that makes sense.