I am new to Dataview and am I am having an issue with sorting notes by date. For each book note I list an attribute:
date_finished:: [[2023-07-19]]
I enter the date as a page, but I don’t create a daily note every day so some refer to non-existing notes. I have a table in a “Library” note where I am trying to sort by “date_finished”. It works except for the books where the date_finished
actually points to an existing note.
I figured out from another post that the value of date_finished
is the raw date when there is no file, but a path when the file exists, which messes up the sorting.
My simplified table code is:
TABLE author, medium, date_finished AS "date read", rating, "" as cover, meta(date_finished) as meta
FROM #book
WHERE file.name!= "book template"
WHERE status!= "#book/status/readingnow"
SORT date_finished DESC
I tried looking in meta(date_finished)
but there are no fields that just return the value.
How do I sort these notes just based on date, irrespective to whether or not the daily note exists?
Thanks!