Re: Age in days

From: Michael Glaesemann <grzm(at)myrealbox(dot)com>
To: strivens(at)bcm(dot)edu
Cc: postgresql sql list <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Age in days
Date: 2005-09-13 05:12:27
Message-ID: 8F42CC15-BD6E-4A01-89DD-824C17A35E0B@myrealbox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

  • Age in days at 2005-09-09 16:04:44 from Mark A. Strivens

Browse pgsql-sql by date

  From Date Subject
Next Message Eugene E. 2005-09-13 08:45:06 Re: How do I convert an integet to a timestamp?
Previous Message Gnanavel S 2005-09-13 05:01:33 Re: Age in days