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:[EMAIL PROTECTED] 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°
>
>


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to