Dataview query returned empty

Hi,

I’m using the following dataview query below to generate a list of notes that I created for the day, but the result is always empty. I tested several different ways & the query works, but as soon as I put the “where” clause, the results turned empty & I’m sure i created at least one note (file) that day.

I also checked the format of where clause is correct.

Is there anything that i missed from that query?

thanks a lot in advance

Here is the query:

table File as "File"
from ""
where file.mdate = date(2022-04-05)
sort file.name asc, file.mtime asc 

I think you need to put the date in quotes. This worked for me:

```dataview
TABLE file.mday
FROM "" 
WHERE file.mday = date("2022-04-05")
SORT file.mtime desc
```

Thanks Craig for the correction. I also notice that in your “where” clause it’s actually file.mday instead of file.date. all OK now.

You’re welcome! You can see all the date fields associated with a file in the Dataview docs:

https://blacksmithgu.github.io/obsidian-dataview/data-annotation/#implicit-fields

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