X-Original-To: pgsql-sql@postgresql.org Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by postgresql.org (Postfix) with SMTP id 6F9E4474E53 for ; Mon, 17 Mar 2003 09:09:26 -0500 (EST) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Mon Mar 17 15:09:29 2003 +0100 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id PAA06647; Mon, 17 Mar 2003 15:09:28 +0100 (MET) Message-ID: <3E75D718.15DCFFA5@rodos.fzk.de> Date: Mon, 17 Mar 2003 15:09:28 +0100 From: Christoph Haller X-Mailer: Mozilla 4.77 [en] (X11; U; HP-UX B.10.20 9000/780) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Cc: mallah@trade-india.com Subject: Re: Formatting intervals.. Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Archive-Number: 200303/394 X-Sequence-Number: 12433 > > only last one question, > how the truncate 9 mons 9 days to only month part ie > 9 mons ? > select date_part('month',age ('10-10-1999'::timestamp , '1-1-1999'::timestamp )); date_part ----------- 9 (1 row) or select extract (month from age ('10-10-1999'::timestamp , '1-1-1999'::timestamp )); date_part ----------- 9 (1 row) Regards, Christoph