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.
Craig
2
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:
```dataview
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?
desk7
3
It’s possible to specify time. This works for me
```dataview
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.
2 Likes
Craig
4
That’s great, @desk7 ! I didn’t know about the “T” separator. Works perfectly for me.
Thank you so much desk7!!!
1 Like
Thanks for the reference!
system
Closed
8
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.