Re: BUG #1653: Bug in date

From: Guilherme Silva <guilherme(dot)silva(at)nexxera(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1653: Bug in date
Date: 2005-05-06 20:35:43
Message-ID: 427BD51F.5020503@nexxera.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Negative, i know what the to_date do.

See the "dt_transacao _/*<=*/_ to_date("

The <= make the first sql equal to second

Second: "dt_transacao _/*<*/_ to_date('02042005000000')"

Guilherme Silva
Programador - Planejamento
E-mail: guilherme(dot)silva(at)nexxera(dot)com
Tel/Fax: +55 48 2106-5698
ICQ: #119540871
http://www.nexxera.com
NEXXERA Tecnologia e Serviços S.A.
"Seu ambiente eletrônico de negócios"

Tom Lane wrote:

>"Guilherme" <guilherme(dot)silva(at)nexxera(dot)com> writes:
>
>
>>BILHETAGEM=# select sum(tm_arquivo) from bilhete where
>>cd_caixa_postal_principal=1304 AND
>>BILHETAGEM-# dt_transacao >= to_date('01042005000000', 'ddmmyyyyHH24MISS')
>>AND
>>BILHETAGEM-# dt_transacao <= to_date('01042005235959', 'ddmmyyyyHH24MISS');
>>
>>
>
>to_date() produces a date, not a timestamp. I suspect you are after
>to_timestamp. If dt_transacao is a timestamp, the above will only
>select rows that are at exactly midnight of 2005-04-01, because that's
>what the date values will promote to.
>
> regards, tom lane
>
>
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Guilherme Silva 2005-05-06 20:40:09 Re: BUG #1653: Bug in date
Previous Message Tom Lane 2005-05-06 20:13:52 Re: BUG #1653: Bug in date