Search Postgresql Archives

RES: Dates rejected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx]Em nome de
> Andreas Kretschmer
> Enviada em: segunda-feira, 16 de outubro de 2006 13:41
> Para: pgsql-general@xxxxxxxxxxxxxx
> Cc: Carlos H. Reimer
> Assunto: Re: [GENERAL] Dates rejected
>
>
> Martijn van Oosterhout <kleptog@xxxxxxxxx> 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°
>
>



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux