# Saving date in date format

**URL:** <https://forum.bubble.io/t/saving-date-in-date-format/335753>\
**Category:** Need help\
**Created:** [August 18, 2024, 7:52am UTC](https://forum.bubble.io/t/saving-date-in-date-format/335753 "2024-08-18T07:52:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjamin.bm.andrews](https://avatars.discourse-cdn.com/v4/letter/b/91b2a8/32.png) [@benjamin.bm.andrews](https://forum.bubble.io/u/benjamin.bm.andrews)\
**Post date:** [August 18, 2024, 7:52am UTC](https://forum.bubble.io/t/saving-date-in-date-format/335753/1 "2024-08-18T07:52:28Z")

</div>

Im using air date/time picker for the user to select the date, the same thing is happening if use the bubble inbuilt one. It appears to be saving as text. When I do the expression  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/1/c/1c2daf01b12d65146f4733ea38fc56a1c29a38e4.png)  
Its in red and it doesnt matter the combination it all comes back to the initial component returning in text.

Im positive that I have used it in the past with no problems to get the actual date and being able to manipulate as a date. have I messed something up?

---

<div class="post-metadata">

**Author:** ![Zeroic](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/zeroic/32/246980_2.png) [@Zeroic](https://forum.bubble.io/u/Zeroic)\
**Post date:** [August 18, 2024, 8:45am UTC](https://forum.bubble.io/t/saving-date-in-date-format/335753/2 "2024-08-18T08:45:38Z")

</div>

Hi! You would need to remove the `:formatted as` operator so that Bubble recognizes this as a date and stores it in the DB accordingly. Formatted as essentially makes it a text which you wouldn’t want

---

<div class="post-metadata">

**Author:** ![benjamin.bm.andrews](https://avatars.discourse-cdn.com/v4/letter/b/91b2a8/32.png) [@benjamin.bm.andrews](https://forum.bubble.io/u/benjamin.bm.andrews)\
**Post date:** [August 18, 2024, 9:05am UTC](https://forum.bubble.io/t/saving-date-in-date-format/335753/3 "2024-08-18T09:05:20Z")

</div>

So how can I get a date showing as what I have formatted but as a date field. Or am I stuck working with the default mm/dd/yyyy formatting for dates in the background for calculations and then format it how I want as text for presentation?

---

<div class="post-metadata">

**Author:** ![Zeroic](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/zeroic/32/246980_2.png) [@Zeroic](https://forum.bubble.io/u/Zeroic)\
**Post date:** [August 18, 2024, 9:07am UTC](https://forum.bubble.io/t/saving-date-in-date-format/335753/4 "2024-08-18T09:07:57Z")

</div>

Yes, you need to store the date as is in the DB. However, when showing that in your UI, you can use the `:formatted as` operator accordingly

---

<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 27, 2024, 7:53am UTC](https://forum.bubble.io/t/saving-date-in-date-format/335753/5 "2024-10-27T07:53:03Z")

</div>

Closed on October 27, 2024, 7:53am UTC

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