How do I add Time to a Date

Hi I hope this is a simple question but it has been bugging me for quite some time. I have a Date Picker and a Time Picker. How do I save (or combine) the Date and Time into one entry in the database. Basically right now I have June 22, 2020 and I have 4:00 PM as two separate entries. How do I save them as June 22, 2020 4pm?

1 Like

Hi @zachenson

When creating a Thing, you can set your field Date = Date Picker’s value:change hours to Time Picker’s value:extract hour:change minutes to Time Picker’s value:extract minutes:change seconds to Time Picker’s value:extract seconds

Let me know if that does the trick

3 Likes

Dates ARE times. Read everything I’ve written on this topic, especially watch this:

1 Like

Wow thank you @keith that is a very thorough overview of how dates (time) works in Bubble. Much appreciated.

1 Like

@keith I really appreciate your video. I feel like it would be really helpful if @emmanuel or someone from Bubble put together an official video or lesson on how time works in Bubble. I think its a pretty big topic (hence why @keith made the video) that is difficult to understand with current Bubble documentation.

@ambroisedlg
I have HTML element i.e. time picker where i’m getting result in text format and so then i’m running another javascript code for text to date conversion.
But result is not what exactly it suppose to be. I want to perform action like +(minutes):60 to date.
How can i achieve this?