Air date picker values to database

Dates are times. Regards of whether you care about the “time” (hours, minutes, seconds) component of a date object (and whether you ignore it, set those components to 0, etc.), a “date” object (which we should think of as a “date/time” object) is no longer a date if it has no time values.

We can, if we wish, convert objects of the date data type to other representations, such as a string (what Bubble calls a “text” data type), using operators such as :formatted as...

Comparing two date objects (for example, date_x and date_y) using their text representations is one of the easiest ways to tell if those two events happen on the same calendar day. For example, the following expression returns “yes” if date_x and date_y happen on the same date:

date_x:formatted as 11/17/2018 is date_y:formatted as 11/17/2018

Note: You really DON’T want to store a date as its text representation as it becomes hard to convert the text constantly back into a date. But we can always turn a date object into all sorts of text representations of that date/time.

For more on dates and various date-wise comparisons you can do, see my other posts and post replies where I mention “date/time”. Here’s a good one:

Hope this helps!