From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ha Truong Subject: Re: Get the maximum date within a list of dates Date: Sun, 22 Dec 2013 17:31:05 +0800 Message-ID: References: , <8738llbc9i.fsf@bzg.ath.cx>, <87iouh9whf.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_8ff901cb-75bc-4023-81c7-ce54120f42d5_" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VufNU-0003x5-VL for emacs-orgmode@gnu.org; Sun, 22 Dec 2013 04:31:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VufNP-0006Ia-T4 for emacs-orgmode@gnu.org; Sun, 22 Dec 2013 04:31:16 -0500 In-Reply-To: <87iouh9whf.fsf@bzg.ath.cx> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: "emacs-orgmode@gnu.org" --_8ff901cb-75bc-4023-81c7-ce54120f42d5_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Thanks Bastien=2C it's what I am expecting :) > From: bzg@gnu.org > To: truonghatsts@outlook.com > CC: emacs-orgmode@gnu.org > Subject: Re: Get the maximum date within a list of dates > Date: Sun=2C 22 Dec 2013 08:27:08 +0100 >=20 > Bastien writes: >=20 > > Put your cursor in @2$2 then C-c ^ T to sort by "reversed" date > > (oldest last). >=20 > Also remember you can use ELisp in formulas: >=20 > | Date 1 | Date 2 | Duration | > |-------------------------+-------------------------+----------| > | [2013-12-21 sam. 00:00] | [2013-12-22 dim. 00:00] | 86400.0 | > #+TBLFM: $3=3D'(- (org-time-string-to-seconds "$2") (org-time-string-to-s= econds "$1"))=3BL >=20 > PS: note the quotes around "$2" and "$1"=2C they are necessary so > that the date is not literally inserted in the formulas when Org > is computing it. >=20 > HTH=2C >=20 > --=20 > Bastien = --_8ff901cb-75bc-4023-81c7-ce54120f42d5_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Thanks Bastien=2C it's what I am= expecting :)

>=3B From: bzg@gnu.org
>=3B To: truonghats= ts@outlook.com
>=3B CC: emacs-orgmode@gnu.org
>=3B Subject: Re: G= et the maximum date within a list of dates
>=3B Date: Sun=2C 22 Dec 20= 13 08:27:08 +0100
>=3B
>=3B Bastien <=3Bbzg@gnu.org>=3B writ= es:
>=3B
>=3B >=3B Put your cursor in @2$2 then C-c ^ T to sor= t by "reversed" date
>=3B >=3B (oldest last).
>=3B
>=3B A= lso remember you can use ELisp in formulas:
>=3B
>=3B | Date 1 = | Date 2 | Duration |
>=3B |---------= ----------------+-------------------------+----------|
>=3B | [2013-12= -21 sam. 00:00] | [2013-12-22 dim. 00:00] | 86400.0 |
>=3B #+TBLFM: $= 3=3D'(- (org-time-string-to-seconds "$2") (org-time-string-to-seconds "$1")= )=3BL
>=3B
>=3B PS: note the quotes around "$2" and "$1"=2C they= are necessary so
>=3B that the date is not literally inserted in the = formulas when Org
>=3B is computing it.
>=3B
>=3B HTH=2C>=3B
>=3B --
>=3B Bastien
= --_8ff901cb-75bc-4023-81c7-ce54120f42d5_--