Re: BUG #1653: Bug in date - Mailing list pgsql-bugs

From Guilherme Silva
Subject Re: BUG #1653: Bug in date
Date
Msg-id 427BD629.1020605@nexxera.com
Whole thread Raw
In response to Re: BUG #1653: Bug in date  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
I understand you, sorry my english is too bad, ignore the last email.

I will try use to_timestamp.

Thanks.

Guilherme Silva
Programador - Planejamento
E-mail: guilherme.silva@nexxera.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.silva@nexxera.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
>
>
>

pgsql-bugs by date:

Previous
From: "Llewellyn Falco"
Date:
Subject: request
Next
From: Guilherme Silva
Date:
Subject: Re: BUG #1653: Bug in date