emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: Truong Ha <truonghatsts@outlook.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Get the maximum date within a list of dates
Date: Sun, 22 Dec 2013 08:27:08 +0100	[thread overview]
Message-ID: <87iouh9whf.fsf@bzg.ath.cx> (raw)
In-Reply-To: <8738llbc9i.fsf@bzg.ath.cx> (Bastien's message of "Sun, 22 Dec 2013 08:00:57 +0100")

Bastien <bzg@gnu.org> writes:

> Put your cursor in @2$2 then C-c ^ T to sort by "reversed" date
> (oldest last).

Also remember you can use ELisp in formulas:

| Date 1                  | Date 2                  | Duration |
|-------------------------+-------------------------+----------|
| [2013-12-21 sam. 00:00] | [2013-12-22 dim. 00:00] |  86400.0 |
#+TBLFM: $3='(- (org-time-string-to-seconds "$2") (org-time-string-to-seconds "$1"));L

PS: note the quotes around "$2" and "$1", they are necessary so
that the date is not literally inserted in the formulas when Org
is computing it.

HTH,

-- 
 Bastien

  reply	other threads:[~2013-12-22  7:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-22  6:29 Get the maximum date within a list of dates Truong Ha
2013-12-22  7:00 ` Bastien
2013-12-22  7:27   ` Bastien [this message]
2013-12-22  9:31     ` Ha Truong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87iouh9whf.fsf@bzg.ath.cx \
    --to=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=truonghatsts@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).