How to change the format of the Date Metadata

Hello All,
This is Hussein from Lebanon. I am trying to learn about your system and this is my first post.
I am creating a date metadata and I have the language set to english. I want to keep the language english but since in Lebanon we write the date as dd/mm/yyyy I want to chande the date format to dd/mm/yyyy.
Is there a way to do that?
Thank you in advance,
Hussein

3 Likes

Hello @Hussein_Nassar, welcome to our forum!

We’re glad to find out that we have users from Lebanon! The date format has been a topic of dicussion here a couple of times, since we’re still figuring out how to properly make it compatible with all the different locations. While in the database it is saved as yyyy-mm-dd, in the interface it shows different, and there are two settings that are relevant for it:

  • The WordPress date settings (see how to change it here), which is used to display the date value in the metadata when edition is completed.
  • The browser language, which is the reference used by the Datepicker in the item metadata edition form.

In your question, you seem to have wrongfully typed both dates formats equally, but my best guess is that your browser is set to your native language (Arabic, French? Forgive my ignorance on this)… would that be the case?

Hope we can find the solution for this and any other issues, We’re curious to see what you are working on!

Hi @Hussein_Nassar did you have any progress on this?

Hello Mateus,
Fist wanna say thanks for welcoming me and thank you for the answer and sorry for getting back late.
In Lebanon, we tend to write the date as dd/mm/yyyy. However we also tend to use english (en_US) browser and english language on wordpress. So when this happens wordpress offer us the format: mm/dd/yyyy.
So I am not sure if there is a way to write the data as dd/mm/yyyy and keep the language of wordpress in en_us.
You think there is a way to solve this?
Regarding what I am working on: now I am testing the system on a hobby of mine which is data repository of mushrooms. Later hopefully I want to assist an environmental NGO in creating their repository.

No problem, we also tend to have our own rhythm here :slight_smile:

Yeah sadly that would not be possible by now. We would have to create an option to the Date metadata type. I created an issue for this, which should be in low priority by now, but can be addressed in the future:

Nice have fun with it and good luck on your projects :wink:

Hello again
and thank you for your answer. I am trying to reinstall a fresh version of tainacan having the language set to display dd/mm/yyyy.
However, when I am deleting the plugin and reinstalling it again i find out that old data is still there. Which tables from the database i need to delete so I erase all data of tainacan?
Thank you for the continued support.
Hussein

Yeah, the database is not cleared when a plugin is removed. While I could point you to the database tables, a much safer way is to remove the collections from the administrative UI. It should start a background process that will perform the deletions and necessary checks. You can keep track of the deletion status in the repository menu “Activities” → “Processes”.

That said, remember that

And that the way you see the data in the front varies in two settings:

Thank you Mateus,
That did help!