Re: functions for date parsing. - Mailing list pgsql-general

From Robert Treat
Subject Re: functions for date parsing.
Date
Msg-id 1024947243.1647.52.camel@camel
Whole thread Raw
In response to functions for date parsing.  ("Jeff MacDonald" <jeff@tsunamicreek.com>)
Responses Re: functions for date parsing.
List pgsql-general
db=# select date_trunc('month',age(now()::date,'1990-01-01'::date));

   date_trunc
-----------------
 12 years 5 mons
(1 row)

Robert Treat

On Mon, 2002-06-24 at 10:21, Jeff MacDonald wrote:
> sample=> select age(now()::date,'1990-01-01'::date);
>               age
> -------------------------------
>  12 years 5 mons 22 days 23:00
>
>
> within postgres, how can i parse this to somethig like
>
> 12 years 5 months
>
> Thanks..
>   Jeff.
>





pgsql-general by date:

Previous
From: "Jeff MacDonald"
Date:
Subject: Re: Redirecting Output
Next
From: "Pablo Morales"
Date:
Subject: initdb