Dates in different formats

I have a frontmatter field called created on each file. I have set it as “date” type.
It is normally automatically populated via obsidian templater when using the template. Templater is using <% tp.date.now(“YYYY-MM-DD HH:mm”) %>
In hindight I know above has an inconsistency …
Sometimes I may update created field manually and picks up from the picker. As a result I notice I have notes with different formats
2025-04-17 05:52 (most of them)
2025-01-11 (some)
2024-10-29 - 12:29 PM (one ?? not sure about this)

I am have a hard time writing dataview to compare the date to today and have lots of issues.
If I use date(created) or date(create,““YYYY-MM-DD”) or date(create,”“YYYY-MM-DD HH:mm”). I also tried inserting substring in there

  • Sometimes skips the file
  • Sometimes Can’t handle format

Options:

  1. Clever way on dataview to bypass my different ways of representing the date
  2. Fix the discrepancy on data type but how do I fix all my notes :frowning:

Ok, I fixed the discrepancy on the notes and stayed with “YYYY-MM-DD”
used regex in notepad++ and did a quick test and worked
and changed the script and now works perfect - not missing dates