I am trying to pass the date pickers value to the database but I only want the date to be passed, not the time as well. I have seen similar queries on this forum mentioning using :extract but I’m not sure if this is correct or how to use this. Can someone please advise?
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:
FYI, I think what what @yusaney1 is referring to is that there is actually a syntax for putting all of the date components together. If you select “Custom” in Format Type, it will show you more-or-less every code that’s available. You’re free to rearrange 'em as you see fit at that point! (And note that there IS a way to get “November” instead of “Nov” right there.)
Simple example:
Format Type > Custom > YYYY-MM-DD // returns 2018-11-18
^^^^ this one is very useful as it’s one of the most common unambiguous date representations and is used by (and can be used with) a lot of external APIs, JavaScript, etc.
But Custom is also cool because you can insert other text (or even dynamic text) right there in the Custom field. Super flexible!