Be very careful when referencing metadata variables. The implicit fields for creation and last modification date are file.cday and file.mday, not cdate and mdate.
No the implicit dates mentioned above are based on the file stats. However the file.day which is also an implicit date related to a file does depend on the date format. More on that later on.
So the query isn’t wrong, it’s just referencing the wrong stuff… ![]()
Sadly, close to ISO format isn’t good enough. It has to be that format, or a portion of that format. The minimum needs to be something like 2023-03, and a fuller variant could be like 2023-03-13T21:31.
Also, if the field is not within a section limited by the --- on separate lines, it’s not in the YAML (or frontmatter) section. ![]()
And on a side note, if you want to define fields in the normal text, that would require double colons, ::. (That is outside of the YAML, use double colons)
As mentioned, the file.cday and file.mday are picked up from file statistics. Neither of these are affected by any field in the frontmatter or not. A field like creation date is a totally different field, and could be referenced using file["creation date"]
Some more on the file.day
The file.day is a little more interesting as to how it’s set. It can be set using the date field in the frontmatter, or by using a valid date, aka YYYY-MM-DD somewhere in the file name. This can be rather useful in some circumstances.
For a little more on this subject, and some examples see my answer in the thread below: