1

I can generate a clock table for the whole month with:

#+BEGIN: clocktable :scope agenda :maxlevel 5 :block 2021-07  :hidefiles t :fileskip0 t :link t

This properly generates a clock table showing all items in my agenda logged in July.

Now, I want to restrict to only a specific range of days in July. I'm working off of the clocktable docs to achieve this.

#+BEGIN: clocktable :scope agenda :maxlevel 5 :block 2021-07 :tstart "<2021-07-22 Thu>" :tend "<2021-7-25 Sun>" :hidefiles t :fileskip0 t :link t

This doesn't work, it generates an identical table to the first one.

#+BEGIN: clocktable :scope agenda :maxlevel 5 :block nil :tstart "<2021-07-20>" :tend "<2021-7-25>" :hidefiles t :fileskip0 t :link t

This doesn't work, it generates a blank table (there are definitely times recorded in this range, by the way, I confirmed by generating tables in their buffers, and comparing the results to the working first example, so I know agenda is properly catching those files).

#+BEGIN: clocktable :scope agenda :maxlevel 5 :tstart "<2021-07-20>" :tend "<2021-7-25>" :hidefiles t :fileskip0 t :link t

This doesn't work, it generates an empty table as well.

I thought perhaps the block is a parent filter, and that :tstart and :tend filter within that filter, so I tried.

#+BEGIN: clocktable :scope agenda :maxlevel 5 :block 2021 :tstart "<2021-07-20>" :tend "<2021-7-25>" :hidefiles t :fileskip0 t :link t

This generates a table for the whole year, with the caption

#+CAPTION: Clock summary at [2021-07-25 Sun 13:15], for the year 2021.

No errors, the only message I get is Updating dynamic block ‘clocktable’ at line 8...done.

What's the correct way to use :tstart and :tend to generate an org-clock-table that covers a specific range of days?

1 Answer 1

2

This works for me:

#+BEGIN: clocktable :scope org-agenda-files :tstart "<2021-07-01 Thu>" :tend "<2021-07-25 Sun>" :maxlevel 8 :hidefiles t :fileskip0 t :link t

Looks like you should write "<2021-07-25"> instead of "<2021-7-25">. (P.S. no :block needed).

Cf. C-h f org-parse-time-string and C-h v org-ts-regexp0.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.