Query due $date-is-file-path
#1211
-
I'm using the default daily journal in obsidian: for every day a file like I'd like in each day to be able to query the tasks due that day. Naively I tried
but it will show today's tasks even for yesterday's file etc. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hello @abuggin, Currently there is no built-in way feature in Tasks to extract the date from the file name. As you have found, The way that people solve this is to create a template system for Obsidian to use when creating the daily note. We have some incomplete notes on ways to do this here: https://obsidian-tasks-group.github.io/obsidian-tasks/advanced/daily-agenda/ I hope they help you get started. Below I show my set-up, in case it gives you some ideas for how you would like to arrange yours. Personally I use: 1 The Core Daily notes pluginWith these settings: The truncated text is: Date format: Note the 2 The Calendar pluginWith these settings: 3 The Templater pluginWith these settings: 4 A sample templateMy template has become quite complicated over time, and very specific to my setup. So below is an idea for a more general example daily note. Again, this is Templater plugin syntax. Note how I create variables at the start for dates I might use - # <% tp.file.title %>
<%*
let yesterday = tp.date.now("YYYY-MM-DD dddd", -1, tp.file.title, "YYYY-MM-DD dddd")
let today = tp.date.now("YYYY-MM-DD", 0, tp.file.title, "YYYY-MM-DD")
let tomorrow = tp.date.now("YYYY-MM-DD dddd", 1, tp.file.title, "YYYY-MM-DD dddd")
%>
<< [[<% yesterday %>]] | [[<% tomorrow %>]]>>
## Due Today
```tasks
not done
due <% today %>
```
## Overdue
```tasks
not done
due before <% today %>
```
## Done Today
```tasks
done
done <% today %>
```
In useThe Calendar plugin shows a dot against each day that has a daily note already created. Every week or two, I click another week or two of dates, to create another batch of notes. |
Beta Was this translation helpful? Give feedback.
-
Hey!
I could of course delete unfinished todos from daily notes of passed days - but I'd like to avoid that for now. It would be helpful if I could do something like |
Beta Was this translation helpful? Give feedback.
Hello @abuggin,
Currently there is no built-in way feature in Tasks to extract the date from the file name.
As you have found,
today
is a short-cut for the current date, so does not help.The way that people solve this is to create a template system for Obsidian to use when creating the daily note.
We have some incomplete notes on ways to do this here:
https://obsidian-tasks-group.github.io/obsidian-tasks/advanced/daily-agenda/
I hope they help you get started.
Below I show my set-up, in case it gives you some ideas for how you would like to arrange yours.
Personally I use:
1 The Core Daily notes plugin
With these settings:
The truncated text is:
Date format:
YYYY/MM/YYYY-MM-DD dddd
Tem…