5

New to obsidian.

I'm trying to set up my daily journal to have a task list at the top, and then an unfinished task list below.

How do I get my unfinished task list to only show tasks that are less than the current day?

This is what I have so far:


dataview
task

from "Daily Notes"

WHERE !completed AND text != ""

top 5 comments
sorted by: hot top controversial new old
[-] Arxir@lemmy.world 2 points 1 year ago* (last edited 1 year ago)

Assuming a key akin to "deadline", you could use or adapt the following:

WHERE dateformat(deadline, "yyyy-MM-dd") <= dateformat(date(today), "yyyy-MM-dd")

Or work with note creation date:

WHERE dateformat(file.date, "yyyy-MM-dd") <= dateformat(date(today), "yyyy-MM-dd")

Instead of "today" use "this.file.name" when working with daily notes as in your case.

To have the list be divided into completed and unfinished, skip the "!completed" and instead use:

SORT completed

Add DESC to reverse order.

Another option would be to have two separate dataview queries. One for completed and one for unfinished tasks.

[-] books@lemmy.world 1 points 1 year ago

Great! Thanks. That did it

[-] tutus@links.hackliberty.org 1 points 1 year ago

You're better using the tasks plugin and a tasks code block for that.

[-] books@lemmy.world 1 points 1 year ago
[-] tutus@links.hackliberty.org 1 points 1 year ago

It's easier to work with if all you're working with is tasks.

this post was submitted on 27 Sep 2023
5 points (100.0% liked)

ObsidianMD

4102 readers
1 users here now

Unofficial Lemmy community for https://obsidian.md

founded 1 year ago
MODERATORS