How do you return all the notes created within a precise period?

Things I have tried

LIST userDefinedField

WHERE file.ctime >= date("date_a")
WHERE file.ctime <= date("date_b which is chronologically after date_a")

…such that for each condition the dates between the inverted commas are formated as follows: yyyy-MM-dd HH:mm:ss

What I’m trying to do

Return a list of the notes and the value of their respective userDefinedField.

Hmm, I’m not sure how to specify the time in a way that Dataview understands.

This query works to list all the pages created in April 2022:

LIST file.ctime
WHERE file.ctime >= date("2022-04-01")
  AND file.ctime < date("2022-05-01")
SORT file.ctime

…but I haven’t been able to figure out how to specify a time to the date() function. Maybe it’s not possible?

It’s possible to specify time. This works for me

LIST file.ctime
WHERE file.ctime >= date("2022-06-03T02:00:00")
  AND file.ctime < date("2022-06-03T18:00:00")
SORT file.ctime

I don’t know if there are other supported formats.


That’s great, @desk7 ! I didn’t know about the “T” separator. Works perfectly for me.

As mentioned in plugin documentation:


Thank you so much desk7!!!

1 Like

Thanks for the reference!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.