Re: Formatting intervals..

From: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Cc: mallah(at)trade-india(dot)com
Subject: Re: Formatting intervals..
Date: 2003-03-17 14:09:28
Message-ID: 3E75D718.15DCFFA5@rodos.fzk.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Browse pgsql-sql by date

  From Date Subject
Next Message Tomasz Myrta 2003-03-17 14:15:22 Re: Formatting intervals..
Previous Message Rajesh Kumar Mallah 2003-03-17 14:02:45 Re: Formatting intervals..