Re: Age in days

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: Age in days
Дата
Msg-id 8F42CC15-BD6E-4A01-89DD-824C17A35E0B@myrealbox.com
обсуждение исходный текст
Ответ на Age in days  ("Mark A. Strivens" <strivens@bcm.edu>)
Список 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 по дате отправления:

Предыдущее
От: Gnanavel S
Дата:
Сообщение: Re: Age in days
Следующее
От: Tom Lane
Дата:
Сообщение: Re: user defined type, plpgsql function and NULL