Re: Strange? BETWEEN behaviour.

Поиск
Список
Период
Сортировка
От William Ivanski
Тема Re: Strange? BETWEEN behaviour.
Дата
Msg-id CACaWZ9R7Fmb+J+iYPn=oFa7BU3E_Y7p9gdXnBaVdVB19uem44w@mail.gmail.com
обсуждение исходный текст
Ответ на Strange? BETWEEN behaviour.  (Bjørn T Johansen <btj@havleik.no>)
Ответы Re: Strange? BETWEEN behaviour.  (Bjørn T Johansen <btj@havleik.no>)
Re: Strange? BETWEEN behaviour.  (Francisco Olarte <folarte@peoplecall.com>)
Список pgsql-general
You could try:

select * from table where date = '2016/10/20'::date

Em qui, 20 de out de 2016 às 09:52, Bjørn T Johansen <btj@havleik.no> escreveu:
I have the following SQL:

SELECT * from table WHERE date BETWEEN to_timestamp('20.10.2016 00:00:00','DD.MM.YYYY HH24:MI:SS') AND to_timestamp('20.10.2016 23:59:59','DD.MM.YYYY
HH24:MI:SS')

date is of type timestamp.

I was expecting to get all the records that had datepart = 20.10.2016 but I am not getting that..

What am I missing?


Regards,

BTJ

--
-----------------------------------------------------------------------------------------------
Bjørn T Johansen

btj@havleik.no
-----------------------------------------------------------------------------------------------
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
-----------------------------------------------------------------------------------------------


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
--

William Ivanski

В списке pgsql-general по дате отправления:

Предыдущее
От: Bjørn T Johansen
Дата:
Сообщение: Strange? BETWEEN behaviour.
Следующее
От: vinny
Дата:
Сообщение: Re: Strange? BETWEEN behaviour.