# Saving and retrieving dates

**URL:** <https://forum.bubble.io/t/saving-and-retrieving-dates/220451>\
**Category:** Need help\
**Created:** [August 17, 2022, 6:59pm UTC](https://forum.bubble.io/t/saving-and-retrieving-dates/220451 "2022-08-17T18:59:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![yj.johnrhee](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/yj.johnrhee/32/120503_2.png) [@yj.johnrhee](https://forum.bubble.io/u/yj.johnrhee)\
**Post date:** [August 17, 2022, 6:59pm UTC](https://forum.bubble.io/t/saving-and-retrieving-dates/220451/1 "2022-08-17T18:59:18Z")

</div>

For a booking situation, user selects a date and time for the booking. When I look at the database, the date is stored like this - with time. I have a separate field for time slot.

 ![Screen Shot 2022-08-17 at 8.45.46 PM](https://us1.discourse-cdn.com/bubble/original/3X/d/5/d52c4ce532628770609b8c4479584e8d34f32aef.png)

The problem I see is when I retrieve this date in a “Do a search for” situation", I don’t think “date = booking date” does not work. So, I cannot but use a walk-around way to get this done.

Is there any way I can save date value as only “date” like 17/08/2022?

Thanks.

---

<div class="post-metadata">

**Author:** ![rpetribu](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rpetribu/32/90852_2.png) [@rpetribu](https://forum.bubble.io/u/rpetribu)\
**Post date:** [August 17, 2022, 7:13pm UTC](https://forum.bubble.io/t/saving-and-retrieving-dates/220451/2 "2022-08-17T19:13:37Z")

</div>

Yes. You can save the date as text.

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/1/0/10731310bac4af7a718470d279f04a47c2e28659.png)

---

<div class="post-metadata">

**Author:** ![bcart0v](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/bcart0v/32/73592_2.png) [@bcart0v](https://forum.bubble.io/u/bcart0v)\
**Post date:** [August 17, 2022, 7:18pm UTC](https://forum.bubble.io/t/saving-and-retrieving-dates/220451/3 "2022-08-17T19:18:18Z")

</div>

The reason you aren’t seeing anything, is because Date = Booking Date is looking at a specific date AND time, so it would be very specific if it ever showed anything. What you’re going to want to do is  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/3/a/3ad829d70395f71a67020570199ed9ae4a31b6d3.png)

You have your Date, could be the same Date for both searches, but you want to look for the specific Date \>= the Date you are searching, and then Date \<= Date you are searching + 1 Day. This will give you a 24 hour range in 1 specific date. But remember, if your starting date is 07/01/2022 08:00 AM, it’s going to show from 07/01/2022 08:00AM - 07/02/2022 08:AM. so I usually change the starting hours to 0 and ending hours to 0, so that it starts at midnight and ends at midnight.

I hope this makes sense!

or, you can do as what @rpetribu says above, save it as a text, and your search will have to convert date to text to match

---

<div class="post-metadata">

**Author:** ![yj.johnrhee](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/yj.johnrhee/32/120503_2.png) [@yj.johnrhee](https://forum.bubble.io/u/yj.johnrhee)\
**Post date:** [August 17, 2022, 7:24pm UTC](https://forum.bubble.io/t/saving-and-retrieving-dates/220451/4 "2022-08-17T19:24:14Z")

</div>

Thank you @rpetribu and @bcart0v. @bcart0v’s way is how I manage dates so far, but I was wondering if I am missing a better/simpler way. Saving the date data as text sounds also good to me, thanks @rpetribu.

I appreciate your knowledge-sharing.

---

<div class="post-metadata">

**Author:** ![bcart0v](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/bcart0v/32/73592_2.png) [@bcart0v](https://forum.bubble.io/u/bcart0v)\
**Post date:** [August 17, 2022, 7:28pm UTC](https://forum.bubble.io/t/saving-and-retrieving-dates/220451/5 "2022-08-17T19:28:28Z")

</div>

I save dates both ways, the long-date format and text format, just so in the future if I need to do data searches differently the option is there. it won’t hurt anything to have the option!

---

<div class="post-metadata">

**Author:** ![rpetribu](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rpetribu/32/90852_2.png) [@rpetribu](https://forum.bubble.io/u/rpetribu)\
**Post date:** [August 17, 2022, 7:28pm UTC](https://forum.bubble.io/t/saving-and-retrieving-dates/220451/6 "2022-08-17T19:28:37Z")

</div>

No problem. Glad I helped…

I have some booking apps and found that working with dates is always better with 3 fields:

- Date as Date
- Date as text mm/dd/yyyy
- Date as text HH:MM

Depending of what you want, you can use one of these fields in your searches. It gives you more versatility and agility with searches…

---

<div class="post-metadata">

**Author:** ![rpetribu](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rpetribu/32/90852_2.png) [@rpetribu](https://forum.bubble.io/u/rpetribu)\
**Post date:** [August 17, 2022, 7:29pm UTC](https://forum.bubble.io/t/saving-and-retrieving-dates/220451/7 "2022-08-17T19:29:13Z")

</div>

> [@bcart0v](#):
>
> I save dates both ways, the long-date format and text format, just so in the future if I need to do data searches differently the option is there. it won’t hurt anything to have the option!

😂 Same here

---

<div class="post-metadata">

**Author:** ![yj.johnrhee](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/yj.johnrhee/32/120503_2.png) [@yj.johnrhee](https://forum.bubble.io/u/yj.johnrhee)\
**Post date:** [August 17, 2022, 7:31pm UTC](https://forum.bubble.io/t/saving-and-retrieving-dates/220451/8 "2022-08-17T19:31:19Z")

</div>

@rpetribu @bcart0v  
I just went back to my database and just added text field. Haha~~~  
Great pleasure to learn more.

Thanks you, gents. 😍

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [October 26, 2022, 6:59pm UTC](https://forum.bubble.io/t/saving-and-retrieving-dates/220451/9 "2022-10-26T18:59:31Z")

</div>

Closed on October 26, 2022, 6:59pm UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
