From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Shelagh Manton Newsgroups: gmane.emacs.help Subject: Re: org-mode time spreadsheet Date: Sat, 10 Jan 2009 02:22:58 +0000 (UTC) Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1231554222 2492 80.91.229.12 (10 Jan 2009 02:23:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 10 Jan 2009 02:23:42 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 10 03:24:51 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LLTWr-00007x-VE for geh-help-gnu-emacs@m.gmane.org; Sat, 10 Jan 2009 03:24:50 +0100 Original-Received: from localhost ([127.0.0.1]:35751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LLTVc-0002VN-1d for geh-help-gnu-emacs@m.gmane.org; Fri, 09 Jan 2009 21:23:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LLTVI-0002Uy-9L for help-gnu-emacs@gnu.org; Fri, 09 Jan 2009 21:23:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LLTVG-0002Ua-0H for help-gnu-emacs@gnu.org; Fri, 09 Jan 2009 21:23:11 -0500 Original-Received: from [199.232.76.173] (port=59535 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LLTVF-0002UX-T1 for help-gnu-emacs@gnu.org; Fri, 09 Jan 2009 21:23:09 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:59128 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LLTVF-0001z9-GI for help-gnu-emacs@gnu.org; Fri, 09 Jan 2009 21:23:09 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LLTVC-0004AU-VS for help-gnu-emacs@gnu.org; Sat, 10 Jan 2009 02:23:06 +0000 Original-Received: from 203-219-222-168-cbr-pow-ts2-2600.tpgi.com.au ([203.219.222.168]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 10 Jan 2009 02:23:06 +0000 Original-Received: from shelagh.manton by 203-219-222-168-cbr-pow-ts2-2600.tpgi.com.au with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 10 Jan 2009 02:23:06 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 40 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 203-219-222-168-cbr-pow-ts2-2600.tpgi.com.au User-Agent: Pan/0.132 (Waxed in Black) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:61234 Archived-At: 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