In logseq I am not able to create a query that returns blocks with start
property (a date in [[Journal Date format]]
) in the last 10 days.
What am I doing wrong? the following code seems to extract all the blocks but does not apply the time filter
#+BEGIN_QUERY
{ :title "Last 10 days activities"
:inputs [:-10d :today]
:query [
:find (pull ?b [*])
:in $ ?start ?stop
:where
[?b :block/properties ?prop]
[(get ?prop :start) ?daystarted]
[(and (> ?daystarted ?start) (< ?daystarted ?stop))]
]
}
#+END_QUERY