How to query pages between dates by created-date

I have tried this but couldn’t compile correctly.

 {:title [:b "📄 近期文档" ]
:query [:find (pull ?p [*])
  :in $  ?start ?end
  :where
  [(java.util.Date/parse ?start) ?s]
  [(java.util.Date/parse ?end) ?e]
  [?p :block/created-at ?d]
  [(>= ?d ?s)]
  [(<= ?d ?e)]
]
:inputs [ "1 Jan 2023" "7 Jan 2023"]
:collapsed? true
}

There are a lot of examples about query blocks or journals between dates or query pages use constant like :end-of-today-ms but really not my case.

I found some related topics in the community, list here to show my current progress:

Appreciate very much for your help

Welcome. In the listed topics:

  • The first topic doesn’t relate, as the answer for Java is no.
  • The second topic contains some good starting code (although for updated-at instead of created-at).
  • The third topic provides the needed conversion, but your inputs should be in YYYYMMDD format (like in the second topic).