emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to Calculate duration time in Table ?
@ 2009-07-21 19:06 Xin Shi
  2009-07-21 19:45 ` Nick Dokos
  0 siblings, 1 reply; 6+ messages in thread
From: Xin Shi @ 2009-07-21 19:06 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 302 bytes --]

Hello,

I have a table in org which stores the date, I'm wondering if there is any
function to calculate the duration? For example:

| Start Date |   End Date | Duration |
|------------+------------+----------|
| 2004.08.07 | 2005.07.08 |          |

I tried to use B&-C&, but failed ...

Thanks!

Xin

[-- Attachment #1.2: Type: text/html, Size: 361 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to Calculate duration time in Table ?
  2009-07-21 19:06 How to Calculate duration time in Table ? Xin Shi
@ 2009-07-21 19:45 ` Nick Dokos
  2009-07-21 21:37   ` Bastien
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2009-07-21 19:45 UTC (permalink / raw)
  To: Xin Shi; +Cc: emacs-orgmode

Xin Shi <shixin111@gmail.com> wrote:

> I have a table in org which stores the date, I'm wondering if there is any
> function to calculate the duration? For example:
> 
> | Start Date |   End Date | Duration |
> |------------+------------+----------|
> | 2004.08.07 | 2005.07.08 |          |
> 
> I tried to use B&-C&, but failed ...
> 

Try the following:

| Start Date |   End Date | Duration |
|------------+------------+----------|
| 2004.08.07 | 2005.07.08 |      335 |
#+TBLFM: $3=(date(<$2>)-date(<$1>))


See this thread:

    http://thread.gmane.org/gmane.emacs.orgmode/7741

as well as this post (which is really a followup on the
above):

    http://article.gmane.org/gmane.emacs.orgmode/7753

The problem that this last article pointed out was solved
in

    http://article.gmane.org/gmane.emacs.orgmode/8001

and Chris Randle's original musings are at

    http://article.gmane.org/gmane.emacs.orgmode/6536/

HTH,
Nick

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to Calculate duration time in Table ?
  2009-07-21 19:45 ` Nick Dokos
@ 2009-07-21 21:37   ` Bastien
  2009-07-21 22:49     ` Nick Dokos
  0 siblings, 1 reply; 6+ messages in thread
From: Bastien @ 2009-07-21 21:37 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode

Nick Dokos <nicholas.dokos@hp.com> writes:

> Try the following:
>
> | Start Date |   End Date | Duration |
> |------------+------------+----------|
> | 2004.08.07 | 2005.07.08 |      335 |
> #+TBLFM: $3=(date(<$2>)-date(<$1>))

Nice, I added a note in Worg/org-hacks.org.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to Calculate duration time in Table ?
  2009-07-21 21:37   ` Bastien
@ 2009-07-21 22:49     ` Nick Dokos
  2009-07-21 23:47       ` Bastien
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2009-07-21 22:49 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Bastien <bastienguerry@googlemail.com> wrote:

> Nick Dokos <nicholas.dokos@hp.com> writes:
> 
> > Try the following:
> >
> > | Start Date |   End Date | Duration |
> > |------------+------------+----------|
> > | 2004.08.07 | 2005.07.08 |      335 |
> > #+TBLFM: $3=(date(<$2>)-date(<$1>))
> 
> Nice, I added a note in Worg/org-hacks.org.
> 

Thanks for doing that. The only problem is that the TBLFM line has been
stripped, so it's not clear *what* the solution is, unless one follows
the link to the message. Would it work better if I had quoted the above
(e.g. boxquote or the gnus message method)?

Thanks,
Nick

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to Calculate duration time in Table ?
  2009-07-21 22:49     ` Nick Dokos
@ 2009-07-21 23:47       ` Bastien
  2009-07-22  3:32         ` Xin Shi
  0 siblings, 1 reply; 6+ messages in thread
From: Bastien @ 2009-07-21 23:47 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode

Nick Dokos <nicholas.dokos@hp.com> writes:

> Bastien <bastienguerry@googlemail.com> wrote:
>
>> Nick Dokos <nicholas.dokos@hp.com> writes:
>> 
>> > Try the following:
>> >
>> > | Start Date |   End Date | Duration |
>> > |------------+------------+----------|
>> > | 2004.08.07 | 2005.07.08 |      335 |
>> > #+TBLFM: $3=(date(<$2>)-date(<$1>))
>> 
>> Nice, I added a note in Worg/org-hacks.org.
>> 
>
> Thanks for doing that. The only problem is that the TBLFM line has been
> stripped, so it's not clear *what* the solution is, unless one follows
> the link to the message. 

Opps, fixed!  Thanks for checking.

> Would it work better if I had quoted the above (e.g. boxquote or the
> gnus message method)?

No no, I just need more sleep :)

-- 
 Bastien

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to Calculate duration time in Table ?
  2009-07-21 23:47       ` Bastien
@ 2009-07-22  3:32         ` Xin Shi
  0 siblings, 0 replies; 6+ messages in thread
From: Xin Shi @ 2009-07-22  3:32 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1136 bytes --]

Cool! thanks for all :)

Xin


On Tue, Jul 21, 2009 at 7:47 PM, Bastien <bastienguerry@googlemail.com>wrote:

> Nick Dokos <nicholas.dokos@hp.com> writes:
>
> > Bastien <bastienguerry@googlemail.com> wrote:
> >
> >> Nick Dokos <nicholas.dokos@hp.com> writes:
> >>
> >> > Try the following:
> >> >
> >> > | Start Date |   End Date | Duration |
> >> > |------------+------------+----------|
> >> > | 2004.08.07 | 2005.07.08 |      335 |
> >> > #+TBLFM: $3=(date(<$2>)-date(<$1>))
> >>
> >> Nice, I added a note in Worg/org-hacks.org.
> >>
> >
> > Thanks for doing that. The only problem is that the TBLFM line has been
> > stripped, so it's not clear *what* the solution is, unless one follows
> > the link to the message.
>
> Opps, fixed!  Thanks for checking.
>
> > Would it work better if I had quoted the above (e.g. boxquote or the
> > gnus message method)?
>
> No no, I just need more sleep :)
>
> --
>  Bastien
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

[-- Attachment #1.2: Type: text/html, Size: 2104 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-07-22  3:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-21 19:06 How to Calculate duration time in Table ? Xin Shi
2009-07-21 19:45 ` Nick Dokos
2009-07-21 21:37   ` Bastien
2009-07-21 22:49     ` Nick Dokos
2009-07-21 23:47       ` Bastien
2009-07-22  3:32         ` Xin Shi

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).