Re: Age in days - Mailing list pgsql-sql

From Michael Glaesemann
Subject Re: Age in days
Date
Msg-id 8F42CC15-BD6E-4A01-89DD-824C17A35E0B@myrealbox.com
Whole thread Raw
In response to Age in days  ("Mark A. Strivens" <strivens@bcm.edu>)
List pgsql-sql
On Sep 10, 2005, at 1:04 AM, Mark A. Strivens wrote:

> select date_trunc('day',age(now(),dateofbirth)) from people

> My questions is, is there any way to convert that figure into an age
> expressed as a number days only?

Try

select current_date - dateofbirth from people;

Michael Glaesemann
grzm myrealbox com




pgsql-sql by date:

Previous
From: Gnanavel S
Date:
Subject: Re: Age in days
Next
From: Tom Lane
Date:
Subject: Re: user defined type, plpgsql function and NULL