General Date Formatting

Absolute beginner here based in the UK.

I’m struggling to see how to change the date format from mm/dd/yyyy in the backend, I need to change it to EU standard dd/mm/yyyy.

It needs to be at a database level (not UI, I know how to fix that) because I’m going to be importing a large dataset from our previous system which is in EU standard.

Would be grateful for any help as I can’t seem to find the answer with search but I can’t be the first to ask so I assume I’m just snowblind.

Dates are stored as unix UTC. You cannot change how it’s displayed in DB but you can choose how you display them to your user with :formatted as

So what you see in backend are only a display of a unix timestamp.

1 Like

About the import, Bubble should be able to parse date correctly. If not, you could choose to save it as a string first and use a backend WF to convert them by sending more informations (like timezone) so Bubble can parse it correctly and update a date field

Thanks @Jici

The DB date format is really jarring for me as an non-US native, thinking that way doesn’t come naturally. I will try the export/import method and see if it parses from dd/mm/yyyy correctly. I worry for dates like 10/03/xxxx which would be interpreted either way.

You should really not save dates as text, as it will make impossible in the future the use of any operators on the data.

As said above, the dates you see are just a human-readable form of the UNIX data stored in database. (check UNIX on google)

As you’ll keep your dates stores as type “date”, you will be able to use dates operators such as :formatted as which will allow you to format the date how you want

There is also a completely custom format where you can do lots of formatting.

@bonjour_17 The problem is not just to display the date but it’s related to import. In most case Bubble will parse date correctly, but in some case not (Let’s say format in import is 01-03-2024, that is march 1st, 2024 but bubble parse it as Jan 3, 2024). The idea to save it in text is to be able, using API Connector and backend WF, to send the “text” date transformed (using regex or split by for example) in a way Bubble will parse it correctly and save it in a date field. This is just a workaround for this problem.

If it’s an import, wouldn’t simple formatting of the date in the csv prior to import solve @QIRO’s issue?

As an aside, I’d be curious how Bubble interprets the date of 20-03-2024; does it figure out which parameter is the month?

1 Like

It turns out that Bubble is aware of the date conflict, just goes :man_shrugging:t4: and throws an error. You have to format the date as dd/mmm/yyyy for it to work correctly.

It seems odd that the chosen date format is mm/dd/yyyy but hey-ho.

1 Like

Thanks for following up. Another quirky undocumented behavior to be aware of.