Query for Notes Created on Today

Hi All -

I am trying to write a query to pull up every note I created today but I am having no luck. For example, from my index page and my daily note I would like to have a list of notes that I created today.

Any help you could provide is greatly appreciated.

Here’s what I have - it’s giving me a collection is nil error currently. So I assume I have a variable wrong?

${template.each(query[[from page where created == date.today]], templates.pageItem)}```

${query[[from index.tag “page” where string.sub(created,1,10) == date.today()]]}

date.today gives you date in format YYYY-MM-DD and created is in ISO (I think), so it is something like this 1970-01-01T00:00:00.000Z. To compare strings you have to cut the relevant part from created.