Saving date in date format

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
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?

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

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?

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

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