From: | "Carlos H(dot) Reimer" <carlos(dot)reimer(at)opendb(dot)com(dot)br> |
---|---|
To: | "Andreas Kretschmer" <akretschmer(at)spamfence(dot)net> |
Cc: | "Pgsql-General(at)Postgresql(dot)Org" <pgsql-general(at)postgresql(dot)org> |
Subject: | RES: Dates rejected |
Date: | 2006-10-16 17:08:23 |
Message-ID: | PEEPKDFEHHEMKBBFPOOKAELIDFAA.carlos.reimer@opendb.com.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)a-kretschmer(dot)de]Em nome de
> Andreas Kretschmer
> Enviada em: segunda-feira, 16 de outubro de 2006 13:41
> Para: pgsql-general(at)postgresql(dot)org
> Cc: Carlos H. Reimer
> Assunto: Re: [GENERAL] Dates rejected
>
>
> Martijn van Oosterhout <kleptog(at)svana(dot)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°
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Brandon Metcalf | 2006-10-16 17:15:36 | old Pg interface |
Previous Message | Peter Eisentraut | 2006-10-16 17:01:33 | Re: [GENERAL] ISO week dates |