Conditional Date Comparison Issue

I am new in Bubble community and is leaning how to code in Bubble. I run into an issue when I tried to do a date comparison as the condition to make the button visible. I have the following comparison through searching for data base entries:

Date Start < Dateinput B’s value +(seconds)43200 change hours to 8 +seconds)(7200)

It appears that Bubble will only execute

Date Start < Dateinput B’s value +(seconds)43200 and will ignore the remaining. However, if I assign

Date vari= Dateinput B’s value +(seconds)43200 change hours to 8 +seconds)(7200) The Date vari will have the expected outcome and the whole expression will be executed.

Is there a way to make my comparison to execute the whole expression?



Can you provide screenshots or recreate it in the forum app.

Below is the screen shots of a simple test I conducted when the database has only one entry with Date Start: 07/21/2016 12:00am Test outcome: when Dateinput B is earlier or equal to 07/20/2016 12:00pm, the Conditional Button will be displayed.

I haven’t actually used the change hours to function, I am not really familiar with this particular problem. I might be able to help a different way if I knew the end result of what it accomplishes.

I am working on an daily parking application for the parking spaces in California time zone. When a person type in their parking checkin and checkout dates with default hours of 12:00am, in the database the time stored time will be adjusted to the server time zone.

What I like to accomplish is to be able to restore the time as if the person is in California. For example, if a person is in the East Coast, the check in date 7/15/2016 12:00am will be stored as 7/14/2016 9:00pm in the database if it is stored directly. I would like to manipulate the date so it will be stored in the database as 7/15/2016 12:00AM.

Is there a way to manipulate the time so no matter a person’s time zone is, I can restore the date stored in the database as if the person is type in these dates in California?

I have tried to use “Change Hours to” to ensure the hours stored is 12:00am in the database. However, in Day Light Saving Time (DST), I have to use “Change Hours to 7” given California is UTC -7 hours while in non Day LIght Saving time, I will need to use “Change Hours to 8” given Carlifornia time will be UTC -8 hours.

Is there a way to use conditional workflows depend on whether the date is in DST or not to accomplish this? If yes, how to do this?

The other issue I run into is for the date comparison issue I raised. Is there a way to compare dates as screenshot shown while “change hours to” is part of the expression? The other possible work around solution is to be able to compare two dates based on the dates only while ignore their values of hours, minutes and seconds. Is this feasible?

Appreciate any help you folks can offer…

Thank you!

You could use “do when condition is true” for each time zone.

Thank you for your lead of using “do when condition is true”. The daylight saving time for 2016 ends at 2:00am November 6. How can I code the condition that a specific date input is still in the Daylight Saving Time or not? Can I code as:

when Dateinput A < “11/06/2016”

The pull down menu after < does not allow me to put a specific date.

Thank You very Much!

Kuohui Liu

Did you ever get an answer to this. I too want to hardcode a specific data, rather than from an input field. It does not allow me to enter at data > “08/30/2017” for example.