Re: Age function

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: Age function
Дата
Msg-id 3DA5FA4A.40108@joeconway.com
обсуждение исходный текст
Ответ на Age function  ("Mihai Gheorghiu" <tanethq@earthlink.net>)
Список pgsql-general
Mihai Gheorghiu wrote:
> PG7.2.1 on RH7.3
>
> SELECT AGE ('10/10/02', '1/10/02');
> 8mons 30days 23:00
>
> SELECT AGE ('10/10/02 4:00PM', '1/10/02');
> 9mons 15:00
>
> Please help.
> Thank you all.

Not clear what you think the problem is. If it is the apparent 1 hr
discrepancy, I think that is due to the fact that January 10th is "standard"
time for your timezone whereas October 10th is still "daylight savings" time.
Try two dates within daylight savings time:

test=# SELECT AGE ('10/10/02 4:00PM', '7/10/02');
      age
--------------
  3 mons 16:00
(1 row)

test=# SELECT AGE ('10/10/02', '7/10/02');
   age
--------
  3 mons
(1 row)

Looks correct to me.

Joe




В списке pgsql-general по дате отправления:

Предыдущее
От: "Mihai Gheorghiu"
Дата:
Сообщение: Age function
Следующее
От: ljb
Дата:
Сообщение: v7.2.3/v7.2.2 installed docs outdated?