Thank you for your responses and apologies for the delay; I was under the impression I would get an email notification when I received a reply, but that is my fault.
I realise now that I may have been somewhat vague in my initial post, so I have expanded on my approach in the hope to avoid inadvertently missing something out.
Thank you for your suggestions, here are my response to your queries:
- I use YYYY.MM.DD - (Dots rather than dashes out of habit - I have changed the default in settings so this should have no effect though).
- I attempted using “WHERE Due_Date = date(this.file.name) OR Do_Date = date(this.file.link)” but unfortunately the dataview then pulled every entry in from my vault.
- The title format is still up for grabs. I currently use “gggg-[W]ww” which outputs the year followed by the week.
Screenshots -
https://imgur.com/a/Wmwxw9M
I personally have not found the tasks functionality within obsidian to be useful and have tried to solve the issues I was having by using dataview.
My approach is as follow:
- All notes created will receive a tag based on their completion status:
Not Started
Started
Waiting On
Return To
Completed
- If I would like to complete them on a particular day, I will input a date next to “Do_Date:” and a time next to “Do_Time”. I will also assign a priority to a task if it has not been scheduled so that the most important tasks float to the top of my outstanding files list, but I digress.
- This date and time will be picked up when a daily note is created on the set day using dataview (Using periodic notes and calendar - please see the above images for examples).
- I will complete the task, change the status (i.e. from not started to completed or anything in between) and move on to the next task.
I capture the date that a file scheduled within the YAML of each note under “Due_Date” so cannot use the .month or .year adjuncts which one could use with the file.ctime or file.mtime.
My approach works well for daily notes with my current template, but I am lost as to how to make this work for weekly, monthly and yearly notes. For example, If I were to open 2021-49 (Week 49 of 2021, commencing on Monday 6th December) I would like the dataview table to show all tasks scheduled for this week 49 (6th December to 12th December).
Take the following string:
Where (Due_Date = “<% tp.file.title %>” or Do_Date = “<% tp.file.title %>”)
Would output:
Where (Due_Date = “2021-49” or Do_Date = “2021-49”)
I was hoping that the dataview could query the Due_Date and Do_Date and return any dates that occurred within, say, week 49 of 2021.
Potential Ideas (with my limited knowledge)
- What if I were to change the title format of a weekly note to something different (Moment.js | Docs). Is there a way that one could then filter in the way described above?
- I could change the format to YYYY.MM.DD. Would this then enable one to use some formula to add 6 days to this date and search for files that have a due_date or do_date that falls between the two dates (Or on)? I would be hesitant about this though as I would then need to alter my daily notes format, so could run in to some more issues.
I entirely appreciate that you do not use daily notes so this may be outside your scope but I appreciate the feedback.