Title in Querys with <%Today%>

Hello
How can i add the today date on title like:
#+BEGIN_QUERY
{:title [:b “Tasks scheduled for this page day <%Today%>”]

I have added the query as Template for my daily note
Is that possible?

regards
Floonder

  • <%Today%> (or <%today%>) generally works (that is inside templates or macros).
    • But queries are parsed differently.
  • Could you provide more details?
    • What is your intention?
    • How does your template look like?
      • Have you tried to place the title above the query (i.e. outside of it)?

Hi
My Idea is following:
I have a Journal Template with that Scritp:

#+BEGIN_QUERY
{:title [:b "Tasks scheduled for this page day <%Today%>"] 
 :inputs [:query-page] ; lower-case name of the page the query is on
 :query [:find (pull ?b [*])
  :in $ ?page
  :where
   [?p :block/name ?page] ; this is always lower-case
   [?p :block/journal-day ?day]
   [?b :block/scheduled ?day]
   [?b :block/marker ?m]
   [(contains? #{"TODO" "LATER"} ?m)] ; can use whatever state you want here, just an example
 ]
}
#+END_QUERY

Source: scheduled tasks on day of journal → Thank you Siferiax for that Query.

If a new journal is created that query shows me all task form that day.
Previous I had a title called " Task from Today <%Today%>" (But I create a new page in the Future the Date of today is taken. Thats not what I need)
Now I want that Titel in the query. Is it possible to get the Page name from the journal in the Titel ?

regards
Floonder

If I understand correctly:

  • <%Today%> in the title of a query in a template works.
    • This is this thread’s title.
  • But what you need is different, something like <%query page%>

yes thats correct.
That’s a pity that doesn’t exist. Perhaps in the future ? :slight_smile:

Thank you for your help