Re: DateTime fields

Поиск
Список
Период
Сортировка
От Dale Anderson
Тема Re: DateTime fields
Дата
Msg-id s9585d07.000@crystalsugar.com
обсуждение исходный текст
Ответ на DateTime fields  ("Dale Anderson" <danderso@crystalsugar.com>)
Ответы Re: DateTime fields
Список pgsql-general
Here is am example of what I am doing.....

danderso=# \d test
           Table "test"
 Attribute |   Type    | Modifier
-----------+-----------+----------
 time      | timestamp |

danderso=# insert into test values (to_timestamp('1200 PM JUN 27 2000','HHMI PM MON DD YYYY'));
INSERT 22825 1
danderso=# select * from test;
          time
------------------------
 2000-06-28 00:00:00-05
(1 row)

danderso=#

Thanks,
Dale.

>>> Tom Lane <tgl@sss.pgh.pa.us> 06/26/00 05:41PM >>>
"Dale Anderson" <danderso@crystalsugar.com> writes:
>     I noticed that the DateTime fields and the to_timestamp function
> interpret 12 PM as 00:00 and 12 AM as 12:00.

Huh?

regression=# select '2000-06-12 12:00 am' ::datetime;
        ?column?
------------------------
 2000-06-12 00:00:00-04
(1 row)

regression=# select '2000-06-12 12:00 pm' ::datetime;
        ?column?
------------------------
 2000-06-12 12:00:00-04
(1 row)

Looks fine to me.
Could you be more precise about what you're trying to do?

            regards, tom lane


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

Предыдущее
От: mikeo
Дата:
Сообщение: trigger question
Следующее
От: Louis-David Mitterrand
Дата:
Сообщение: BLOB DBI func() interface under postgres