[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Problem with date calculations in a table
From: |
Nick Dokos |
Subject: |
Re: [Orgmode] Problem with date calculations in a table |
Date: |
Fri, 15 Aug 2008 07:56:01 -0400 |
Chris Randle <address@hidden> wrote:
> Nick Dokos wrote:
> > I've been trying to make a table with the following structure: column
> > 1 contains either a date or is empty; column 2 contains a date that's
> > calculated from the corresponding date in column 1 (if column 1
> > contains a date) or is empty (if column 1 is empty). In the example
> > below, column 2 is supposed to be the date 12 hours or 0.5 days after
> > the date in column 1 (assuming that it is non-empty).
>
> 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