From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephan Schmitt Subject: RE: Problem with date calculations in a table Date: Fri, 15 Aug 2008 19:20:26 +0200 Message-ID: <48A5BADA.4070507@cs.tu-berlin.de> References: <20080815115807.E38CF21E5C@mailhost.cs.tu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KU2zF-0004q6-31 for emacs-orgmode@gnu.org; Fri, 15 Aug 2008 13:21:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KU2zC-0004pf-Po for emacs-orgmode@gnu.org; Fri, 15 Aug 2008 13:21:15 -0400 Received: from [199.232.76.173] (port=57650 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KU2zC-0004pc-Mg for emacs-orgmode@gnu.org; Fri, 15 Aug 2008 13:21:14 -0400 Received: from mail.cs.tu-berlin.de ([130.149.17.13]:38517) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KU2zC-00012e-6c for emacs-orgmode@gnu.org; Fri, 15 Aug 2008 13:21:14 -0400 Received: from localhost (localhost [127.0.0.1]) by localhost-12225.cs.tu-berlin.de (Postfix) with ESMTP id 5BD48203EE for ; Fri, 15 Aug 2008 19:21:11 +0200 (MEST) In-Reply-To: <20080815115807.E38CF21E5C@mailhost.cs.tu-berlin.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org, Nick Dokos Nick Dokos wrote: > Chris Randle wrote: >> I had problems getting date arithmetic to work in tables. I posted my >> findings and solutions here: >> >> http://article.gmane.org/gmane.emacs.orgmode/6536/ >> >> Don't know if it will fix your problem (too lazy to try!) but I suspect >> it will. >> > It did! I don't understand the details yet but the following seems to do > what I want: > > | start | ETA (start + 12 hrs) | > |----------------------+------------------------| > | 2008-08-14 Thu 18:15 | <2008-08-15 Fri 06:15> | > | | | > > #+TBLFM: $2=(date(<$1>) ? <$1>+0.5 : string("")) > > The date in the first column can be just a string as above, a passive > date or an active date (the file is not in the agenda list so I don't > really have to worry about active dates). > > Thanks very much, > Nick > > Hi, I tried it, too, but got the same time (6:15) when adding 1.0 or 2.0. how bizarre! | start | ETA (start + 48 hrs) | |----------------------+------------------------| | 2008-08-14 Thu 18:15 | <2008-08-16 Sat 06:15> | | | | #+TBLFM: $2=(date(<$1>) ? <$1>+2.0 : string("")) Greetings, Stephan