Re: Formatting intervals.. - Mailing list pgsql-sql

From Christoph Haller
Subject Re: Formatting intervals..
Date
Msg-id 3E75D718.15DCFFA5@rodos.fzk.de
Whole thread Raw
In response to Formatting intervals..  (Rajesh Kumar Mallah <mallah@trade-india.com>)
List 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




pgsql-sql by date:

Previous
From: Rajesh Kumar Mallah
Date:
Subject: Re: Formatting intervals..
Next
From: Tomasz Myrta
Date:
Subject: Re: Formatting intervals..