What I’m trying to do
Hi community,
I use de Day Planner Plugin for task management and for Time Tracking those tasks.
This generates something like this:
Day planner
- #task 10:00 - 11:00 Once [scheduled:: 2025-02-18]
[clock::2025-02-17T09:00:30–2025-02-18T10:30:30]- #task 12:45 - 13:45 Twice [start:: 2025-02-11] [scheduled:: 2025-02-11]
[clock::2025-01-03T01:00:00–2025-01-03T02:00:00]
[clock::2025-01-03T03:00:00–2025-01-03T03:30:15]- #task 14:00 - 15:00 Not yet [scheduled::2025-02-11]
I try to sum up all occurrences I worked on a specific task, hoping for a table like this:
Task Duration
once 1h 30 min
twice 1h 30 min 15s
Things I have tried
TABLE WITHOUT ID
Task.text AS Task,
sum(map(Task.clock, (c) => ((date(split(c, "--")[1]) - date(split(c, "--")[0]))))) as Duration
FROM #task
FLATTEN file.tasks AS Task
FLATTEN task.clock AS Cloc
WHERE file=this.file
AND Task.clock
GROUP By Task