Dynamic query to display tasks based on current week (ISO 8601) #3839
-
|
Hello, I am currently implementing a workflow inspired by the "12-Week Year" method. In my setup, I have one note per 12-week goal, structured with headings representing specific weeks:
I can easily filter tasks for a specific week using a static query:
However, this requires manual updates every week. I am looking for a way to make this query dynamic so that it automatically detects and filters by the current week (e.g., using a variable like {{date:YYYY-[S]WW}}). Is there a built-in way in Tasks to achieve this, or a recommended workaround using placeholders? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
|
Hi, yes there is, though I'm not familiar with that mechanism, so you will need to work out the date placeholders yourself. Custom grouping facility, including some date examples - but you should read the whole page before trying the examples: The available date format placeholders are here: |
Beta Was this translation helpful? Give feedback.
-
|
Oh, it's not grouping, it's filtering. So this page instead: |
Beta Was this translation helpful? Give feedback.
-
|
If the above comments don't enable you to answer your question, then I will need example markdown content showing what your inputs are, and specifically telling me what output you want. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for sharing those links. I did get a bit lost in the plugin documentation for a while, but I eventually found my answer.
Let’s take an example: we are currently in week 15. In my 'Project Alpha' file, under the heading "# 2026-W15" , there is a task: 'Set everything up for this week.' Well, the query above will retrieve that specific task. |
Beta Was this translation helpful? Give feedback.
-
|
Super. Thanks for sharing the answer. |
Beta Was this translation helpful? Give feedback.
Thanks for sharing those links. I did get a bit lost in the plugin documentation for a while, but I eventually found my answer.
Let's say you have several notes, where each note represents a project.
Inside these notes, your tasks are organized by week.
You handle this organization by using the week number as a heading, following this format: Year - W[Week Number].
To retrieve the tasks for the current week, you need to use this formula:
Let’s take an example: we are currently in week 15. In my 'Project Alpha' file, under the heading "# 2026-W15" , there is a task: 'Set everything up for this week.' Well, the query above…