From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: date functions in org tables Date: Fri, 25 Feb 2011 17:02:52 -0500 Message-ID: <4548.1298671372@alphaville.usa.hp.com> References: <86r5avlrxd.fsf@googlemail.com> Reply-To: nicholas.dokos@hp.com Return-path: Received: from [140.186.70.92] (port=60407 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pt5kW-0006sR-BF for emacs-orgmode@gnu.org; Fri, 25 Feb 2011 17:02:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pt5kV-00069O-0L for emacs-orgmode@gnu.org; Fri, 25 Feb 2011 17:02:56 -0500 Received: from g5t0009.atlanta.hp.com ([15.192.0.46]:23196) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pt5kU-000699-T8 for emacs-orgmode@gnu.org; Fri, 25 Feb 2011 17:02:54 -0500 In-Reply-To: Message from Thorsten of "Fri, 25 Feb 2011 22:34:22 +0100." <86r5avlrxd.fsf@googlemail.com> 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: Thorsten Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Thorsten wrote: > > Hello, > is there something like a column formula in org that enables me to introduce a > date in the first row and then automatically fills the other rows of > that column with followup dates (+ 1 day or + 1 week i.e.) > like this: > > | date | kg | > |-----------------+----| > | <2011-02-08 Di> | 86 | > | <2011-02-09 Mi> | 85 | > | etc. | | > > thanks for any hints Interactively S- will insert a row with the next date (i.e. the + 1 day bit), but I don't know of a way to make it skip by larger steps (i.e. the + 7 days bit). With a table formula, you can skip by as much as you want: --8<---------------cut here---------------start------------->8--- * Consecutive dates | Date | Weight | |------------------+--------| | <2011-02-25 Fri> | 71 | | <2011-03-04 Fri> | | | <2011-03-11 Fri> | | | <2011-03-18 Fri> | | | <2011-03-25 Fri> | | #+TBLFM: @2$1=<2011-02-25 Fri>::$1=<@-1$1>+7 --8<---------------cut here---------------end--------------->8--- using a field formula to set the first entry and a column formula to calculate the rest, but it just fills up pre-existing rows. IOW, if you want a bigger table, you have to insert a number of empty rows and then recalculate. HTH, Nick