* clocktable display format
@ 2010-03-26 16:31 Olivier Schwander
2010-03-26 22:18 ` Carsten Dominik
2010-03-29 10:21 ` Olivier Schwander
0 siblings, 2 replies; 3+ messages in thread
From: Olivier Schwander @ 2010-03-26 16:31 UTC (permalink / raw)
To: emacs-orgmode
Hello,
I am using clocktable to display a summary of the effort in a subtree.
As I am not particularly interested in precise hourly details, I would
like to display the total time in days instead of hours.
Now I have:
| L | Headline | Time | |
|---+-----------------------+----------+--------|
| | *Total time* | *528:00* | |
and I would like:
| L | Headline | Time | |
|---+-----------------------+----------+--------|
| | *Total time* | *22* | |
I tried to add a formula in the table, but it doesn't work since the
fields are in the format hour:minute. I suppose I could use org-babel to
parse the content of the field and convert it into days but it seems
rather complicated and I would be happy with a simple solution. Any
ideas ?
Thanks,
Olivier
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: clocktable display format
2010-03-26 16:31 clocktable display format Olivier Schwander
@ 2010-03-26 22:18 ` Carsten Dominik
2010-03-29 10:21 ` Olivier Schwander
1 sibling, 0 replies; 3+ messages in thread
From: Carsten Dominik @ 2010-03-26 22:18 UTC (permalink / raw)
To: Olivier Schwander; +Cc: emacs-orgmode
On Mar 26, 2010, at 5:31 PM, Olivier Schwander wrote:
> Hello,
>
> I am using clocktable to display a summary of the effort in a subtree.
> As I am not particularly interested in precise hourly details, I would
> like to display the total time in days instead of hours.
>
> Now I have:
> | L | Headline | Time | |
> |---+-----------------------+----------+--------|
> | | *Total time* | *528:00* | |
>
> and I would like:
> | L | Headline | Time | |
> |---+-----------------------+----------+--------|
> | | *Total time* | *22* | |
>
> I tried to add a formula in the table, but it doesn't work since the
> fields are in the format hour:minute. I suppose I could use org-
> babel to
> parse the content of the field and convert it into days but it seems
> rather complicated and I would be happy with a simple solution. Any
> ideas ?
That is not straight forward - and I also do not think it would be so
useful. Do you want 8 hour days or 24 hour days, for example?
- Carsten
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: clocktable display format
2010-03-26 16:31 clocktable display format Olivier Schwander
2010-03-26 22:18 ` Carsten Dominik
@ 2010-03-29 10:21 ` Olivier Schwander
1 sibling, 0 replies; 3+ messages in thread
From: Olivier Schwander @ 2010-03-29 10:21 UTC (permalink / raw)
To: emacs-orgmode
Le 26 Mar 2010 17:31, Olivier Schwander a écrit:
> Hello,
>
> I am using clocktable to display a summary of the effort in a subtree.
> As I am not particularly interested in precise hourly details, I would
> like to display the total time in days instead of hours.
>
> Now I have:
> | L | Headline | Time | |
> |---+-----------------------+----------+--------|
> | | *Total time* | *528:00* | |
>
> and I would like:
> | L | Headline | Time | |
> |---+-----------------------+----------+--------|
> | | *Total time* | *22* | |
>
> I tried to add a formula in the table, but it doesn't work since the
> fields are in the format hour:minute. I suppose I could use org-babel to
> parse the content of the field and convert it into days but it seems
> rather complicated and I would be happy with a simple solution. Any
> ideas ?
I am replying to myself in order to explain my solution. As it does not
seem to be possible to change the display format, I simply added an
elisp formula in the table (thanks to Carsten who suggested not to use
babel). The difficulty was to parse the content of the field since it's
not a number but a string with a colon in the middle.
#+BEGIN: clocktable :maxlevel 2 :scope subtree
Clock summary at [2010-03-26 ven. 17:56]
| L | Headline | Time | |
|---+-----------------------+----------+-----------|
| | *Total time* | *528:00* | *22 days* |
|---+-----------------------+----------+-----------|
| 1 | All | 528:00 | |
| 2 | Event A | | 72:00 |
| 2 | Event B | | 96:00 |
| 2 | Event C | | 120:00 |
| 2 | Event D | | 120:00 |
| 2 | Event E | | 120:00 |
#+TBLFM: @2$4='(concat "*" (number-to-string (/ (string-to-number (if (string-match "\\(.+\\):.+" @3$3) (match-string 1 @3$3))) 24)) " days*")
#+END:
Notice that the formula is kept when updating the clocktable, so it's
very easy to use.
I really needed this since I had to know the number of days spent to
theses events (the duration of a trip is naturally in days, not in
hours). I am not sure if this tips has a real interest for work, but I
can add it if you ask.
Cheers,
Olivier
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-03-29 10:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-26 16:31 clocktable display format Olivier Schwander
2010-03-26 22:18 ` Carsten Dominik
2010-03-29 10:21 ` Olivier Schwander
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).