From: Mark A. Strivens <strivens@bcm.edu>
To: pgsql-sql@postgresql.org
Subject: Age in days
Date: Fri, 9 Sep 2005 11:04:44 -0500
Message-ID: <200509091104.45412.strivens@bcm.edu> (raw)
If you need to know the age to the nearest day on the present day
I think you can use something like:
select date_trunc('day',age(now(),dateofbirth)) from people
gives:
3 years 2 mons 12 days
My questions is, is there any way to convert that figure into an age
expressed as a number days only?
Many thanks
Mark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: strivens@bcm.edu
Subject: Re: Age in days
In-Reply-To: <200509091104.45412.strivens@bcm.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox