[Orgmode] date functions in org tables

2011-02-25 Thread Thorsten

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
cheers
Thorsten


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] date functions in org tables

2011-02-25 Thread Nick Dokos
Thorsten gruenderteam.ber...@googlemail.com 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-RET 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

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode