Query for notes created between a particular date period


Tags: Habit, Philosophy, Active, Concept, Productivity,
Medium: Book
Genre: Non-Fiction, Self-Help
Type: Literature
Date: 2022-08-07
Time: 11:50AM
Source: Atomic Habits
Author: James Clear

Above is a sample of the Annotation. Emphasis on “Date” and “Time”, because I can’t use implicit fields such as “file.cday” and “file.ctime” because of the reasons discussed in

Regardless, I need to find all the notes I have created between let’s say Date 2022-10-20 and 2022-10-27. What would the query look like? given my restrictions and inexperience using dateview.

I’m no DV expert, but this works:

    ```dataview
    TABLE file.ctime as Created
    FROM "" 
    WHERE file.ctime <= date(2022-10-27) and file.ctime >= date(2022-10-20)
    SORT 
    ```

so, try:

    ```dataview
    TABLE date as Created
    FROM "" 
    WHERE date <= date(2022-10-27) and date >= date(2022-10-20)
    SORT 
    ```
1 Like

Thanks for the swift reply. The solution you proposed works, but I have a question regarding it.

What does “Date as Created” do? Because when I ran the query without “Created” the results didn’t seem to change. I am still learning the ins and outs of dataview as well as obsidian.

Here I am…again. I am dumb, sorry.

I tinkered with the annotation a little bit and the query doesn’t work. Below is a sample of the annotation:

Tags: Book, Learning, Productivity, Active
Type: Literature
Date_Time: 2022-09-29 1:22PM
Time: 1:22PM
Source: How To Take Smart Notes
Author: Sönke Ahrens
Mentioned_Names: Niklas Luhmann

Make note of the new field “Date_Time” and the query was changed to:

LIST Date_Time
WHERE Date_Time >= Date_Time("2022-09-25 8:10PM") and Date_Time <= Date_Time("2022-09-29 1:22PM")

And query returned an error

Dataview: Every row during operation 'where' failed with an error; first 3:

                - Unrecognized function name 'Date_Time'
- Unrecognized function name 'Date_Time'
- Unrecognized function name 'Date_Time'

the Date as Created is setting the heading of the column to Created

It’s probably something to do with timestamp formatting. I don’t know without digging in, but that’s my guess.

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