RES: Dates rejected

Поиск
Список
Период
Сортировка
От Carlos H. Reimer
Тема RES: Dates rejected
Дата
Msg-id PEEPKDFEHHEMKBBFPOOKAELIDFAA.carlos.reimer@opendb.com.br
обсуждение исходный текст
Ответ на Re: Dates rejected  (Andreas Kretschmer <akretschmer@spamfence.net>)
Ответы Re: RES: Dates rejected  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: RES: Dates rejected  (Vivek Khera <vivek@khera.org>)
Re: RES: Dates rejected  (Jorge Godoy <jgodoy@gmail.com>)
Список pgsql-general
Hi,

I don´t know why the developers build in this way... but let me change a
little bit my question.

I´ve executed tree to_date functions but they give a strange answer for date
16/10/2006 (DD/MM/YYYY).

select to_date('16/10/2006','DD/MM/YYYY');
       to_date
---------------------
 2006-10-16 00:00:00
(1 row)

select to_date('15/10/2006','DD/MM/YYYY');
       to_date
---------------------
 2006-10-15 01:00:00
(1 row)

select to_date('14/10/2006','DD/MM/YYYY');
       to_date
---------------------
 2006-10-14 00:00:00
(1 row)

How can we explain the 01:00:00 hour that the to_date function returns for
date 15/10/2006?

Thank you!

Carlos


> -----Mensagem original-----
> De: Andreas Kretschmer,,, [mailto:andreas@a-kretschmer.de]Em nome de
> Andreas Kretschmer
> Enviada em: segunda-feira, 16 de outubro de 2006 13:41
> Para: pgsql-general@postgresql.org
> Cc: Carlos H. Reimer
> Assunto: Re: [GENERAL] Dates rejected
>
>
> Martijn van Oosterhout <kleptog@svana.org> schrieb:
> > > create table tt_teste (datfis timestamp without time zone not null
> > >  CHECK (datfis = trunc(datfis::timestamp without time zone)));
> >
> > What are you trying to do here? If you only want a date, why not just
> > use a date type?
>
> This is an other question ;-)
>
>
> Andreas
> --
> Really, I'm not out to destroy Microsoft. That will just be a completely
> unintentional side effect.                              (Linus Torvalds)
> "If I was god, I would recompile penguin with --enable-fly."    (unknow)
> Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°
>
>


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: query log corrupted-looking entries
Следующее
От: "Brandon Metcalf"
Дата:
Сообщение: old Pg interface