help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-mode time spreadsheet


From: Deniz Dogan
Subject: Re: org-mode time spreadsheet
Date: Wed, 14 Jan 2009 07:46:38 -0800 (PST)
User-agent: G2/1.0

On 10 Jan, 03:22, Shelagh Manton <shelagh.man...@gmail.com> wrote:
> On Fri, 09 Jan 2009 00:09:16 -0800, Deniz Dogan wrote:
> > I hope this formats well, because I'm posting this through Google
> > Groups... Anyways...
>
> > Hi
>
> > I'm trying to have an org-mode table which shows a working day (not
> > necessarily every normal work day, I enter these myself) and when I got
> > in, when I went out to lunch, when I came back, and when I left for the
> > day. I want the last column "TOT" to display how long I was at work
> > minus the time I was out for lunch.
>
> > I'm well aware of timeclock-in, timeclock-out, as well as org-mode's C-
> > c C-x C-i/C-o functionality, but I really want to have it as a
> > spreadsheet. However, it seems that calc isn't that good at working with
> > times, so now I'm asking you for help. Is this possible to do with plain
> > org-mode? If so, what am I doing wrong? Below is the file I'm currently
> > using and it seems that it doesn't realize that the values are actually
> > timestamps.
>
> > | DATE       |    IN | LUNCH FROM | LUNCH TO |   OUT | TOT    |
> > |------------+-------+------------+----------+-------+--------| | THU 18
> > NOV |  9:30 |      12:30 |    13:40 | 14:20 | 2:5    | | FRI 31 DEC |
> > 10:00 |      12:00 |    14:00 | 16:00 | #ERROR | | SAT 1 JAN  |  8:00 |
> >     12:00 |    12:30 | 16:00 | #ERROR | | MON 5 JAN  |  9:00 |    
> > 12:45 |    13:15 | 16:00 | #ERROR | | TUE 6 JAN  | 16:30 |      17:30 |
> >   18:30 | 22:30 | 1:5    | | WED 7 JAN  |  9:00 |      12:00 |    12:40
> > | 20:45 | 11:05  | | THU 8 JAN  | 12:30 |      15:00 |    15:40 | 18:30
> > |        | | FRI 9 JAN  |  9:00 |            |          |       |      
> > | #+TBLFM: $6=$5-$2
>
> > Deniz
>
> If you use the notation for time that calc expects the calculations will
> work.
>
> ie instead of 10:15 use 10@ 15' or even 10h 15m
>
> Shelagh

So suppose I want to change the format from H@ M' S" to H:M.S, how
would I go about doing that? I tried (setq calc-hms-format "%s:%s.%s")
and (defcalcvar) in the same manner, but it just wouldn't work.
Looking in the source code, not being the best of Lisp hackers, it
seems that org-mode doesn't honor the variable.

Deniz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]