Dataview querying a frontmatter

What I’m trying to do

Hi, all.
I’m trying to make a daily note that uses dataview to pull every note that has today as due date. My tasks and events are simple notes with the task or event as the note title plus “date” as a frontmatter value.

My dataview query is:

WHERE date = "2023-06-29"

Even having more than one note with

date: 2023-06-29

my query returns nothing.

Things I have tried

I tried to query with and without the quotation marks “”, tried to put the notes in different subfolders inside the main folder “09. PROJECTS”… I even tried to delete the “WHERE” line to see if the dataview is querying correctly. It is. I got a list of every note there is in “09. PROJECTS” and subfolders as it should be.

Can you help?

1 Like


Does this syntax work?

WHERE date = date(2023-06-29)

Yes! Why?

1 Like

I have no idea why. Just looked at an old query in my vault and copied the syntax from that. Too long ago to remember how I got the syntax. Hope someone else can help.

EDIT: Looking back, I think I must have got the format from this:

1 Like

The line above compares the field
date with the string 2023-06-99, but date is of the type date.

Here eightning creates a new date using the date() function around the string.

Another way of solving this would be to coerce the date to become a string doing the following:

WHERE string(date) = "2023-06-29"

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