DataView : Filter Tasks with certain startTime Field

PS: I am not quite well in English so I am still trying my best to present myself. Please let me know if you know how I can communicate more correctly or properly, thanks in advance!

What I’m trying to do

image

TASK
FROM "Untitled.md"
WHERE startTime != null and startTime >= "12:00"
SORT startTime ASC

When I want to put the tasks that generated by Full Calendar plugin I use, into my Daily Notes Dataview part ,
I basicaly want to filter tasks by time range so that I could categorize them (say, “morning tasks”,“afternoon tasks”, etc) and I am using the startTime and endTime field to do this job.
I try to use this simply WHERE command WHERE startTime >= "12:00" to do it.

Then, the situation appears like that picture shows. I do not want to add the tasks which don’t have such fields(inline or not inline) I want, say, “startTime”.

So I read the github dataview manual and add startTime != null expression and and it, but it do not work. I also tried to find keywords and funcs like exist, any, contains but still not help. Forgive me for being a dataview newish.

Things I have tried

I have

  • searched Dataview Github - List Func part by “any”“contains” etc, but I still can not figure out the answer clearly.

  • browsed and checked some relating threads, but still no answer, especially using inline field.
    PS: These above, I would push myself that I could dig further and deeper into it, but eventually gave up, I think it is more helpful for me to seek for online help use English instead. I think perhaps I could learn more about community and communications.

  • tried to move that task up and down in the article layout, but turned out that did not help.

  • Use test solution below but did not work:

I think, maybe I can put all of tasks which have such inline fields into some specific header, and maybe the problem will be temporarily solved.

TASK
FROM [[Untitled#Routine]]
WHERE startTime != null and startTime >= "12:00"
SORT startTime ASC

But, dataview just showed Dataview: No results to show for task query..

So after all of that, I would like to know how to reach the first goal and why my second solution still not available…

More Things

I don’t quite often online so I feel sorry about if I am not responding quickly.

Hello.

Does this work as you need?


## Routine
- [ ] Test Task 1 [startTime:: 17:00] [endTime:: 18:10]
- [ ] If I create a list here..
- [ ] Test Task 3 [startTime:: 11:00]
## Work
- [ ] Test Task 2 [startTime:: 18:00] [endTime:: 18:20]
- And If I create a list more, here [startTime:: 18:30] [endTime:: 18:40]

## query
```dataview
TASK
WHERE file.name = this.file.name 
WHERE startTime >= "12:00" 
Where contains(text,"startTime")
SORT min(rows.startTime) ASC
```

1 Like

Thank you very much. It works for me very well, and I actually learned things.
SORT min(rows.startTime) ASC is much useful usage, but what is the difference between not using min?

1 Like

I don’t actually know why but I saw I got better results using it.

https://blacksmithgu.github.io/obsidian-dataview/reference/functions/#mina-b

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.