Re: Auto Adjust Age

From: Carlos Mennens <carlos(dot)mennens(at)gmail(dot)com>
To: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Auto Adjust Age
Date: 2011-04-06 15:34:14
Message-ID: BANLkTimOoau7P5bV=x8JBR3yPA6CacjHgA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Apr 6, 2011 at 11:24 AM, JC de Villa <jc(dot)devilla(at)gmail(dot)com> wrote:
> Theres also the age() function....
>
> SELECT age(dob);
>
> Should give you
>
>           age
> -------------------------
>  31 years 5 mons 17 days
>
> If you want to be really exact about it. :)

That worked awesome too!

ide=# SELECT age(dob) FROM users;
age
--------------------------
31 years 10 mons 12 days
(1 row)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Davenport, Julie 2011-04-06 15:47:55 Re: temp tables not dropping at end of script
Previous Message Adrian Klaver 2011-04-06 15:31:11 Re: Why security-definer functions are executable by public by default?