A Meta Property Question Relating to YYYY-MM-DD changing automatically to MM-DD-YYYY. Everywhere else outside of Yaml is not a problem:
Details:
I’ve been using a meta key, ‘CreatedDate:’ in Yaml, using the date format YYYY-MM-DD in the form of a text field (property type). Ok.
It’s because I cannot get ‘CreateDate:’ to view the date in the YYYY-MM-DD format for it will only display with the MM-DD-YYYY format everytime!
I’ve checked all the date format choices in Obsidian and all the plugins I’m using as well.
It’s works AS IS, but sooner or later when I start using properties with Dataview for various display options it’s going to give me some problems in the next few days! ~Rob
It’s very well looks like it’s related to my device.
This means I’m force to using dates in TEXT formatting when using Dataview along with MetaBind etc.
Hope there will be a forthcoming bug fix in Obsidian that will separate date useage apart from our devices in the near future.
Note that there is a vital difference between what is stored in the file vs what is displayed. If the source mode lists the dates in ISO8601, then dataview will understand the properties as dates, even though the displayed value is different.
If you add a date property in Obsidian it’ll store the actual date as an ISO 8601 date in the source mode. That’s the stored text in the file would be something similar to CreateDate: 2025-03-31.
When you’re in live preview and/or reading mode, this should be displayed according to your locale settings, so it could be displayed as something else. Like 31.03.2025 when I’m using the Norwegian locale.
Lastly, when the same date is read by dataview it respects the date format in Settings > Dataview > Date format.
Here is an example showing source mode, live preview and reading mode of the same file:
Here I’ve used MMMM dd, yyyy in my dataview settings, so you see it as mars 31, 2025 in live preview and reading mode.
Finally, the main point to make Dataview happy whenever you get around to using properties (or inline fields) with dates is to stick to the source being in the ISO 8601 format (as shown above), and the properties will be easy to deal with.
Having them as pure dates, will allow you to do whatever formatting of them either through the settings of Dataview, or through the use of dateformat() for specific needs in some query.