From: | Bjørn T Johansen <btj(at)havleik(dot)no> |
---|---|
To: | William Ivanski <william(dot)ivanski(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Strange? BETWEEN behaviour. |
Date: | 2016-10-20 12:26:13 |
Message-ID: | 20161020142613.1f9cfda2@arch-btj.norsvin.local |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Yes, that's what I am doing now but I was just wondering why the other way did not work...
BTJ
On Thu, 20 Oct 2016 12:02:14 +0000
William Ivanski <william(dot)ivanski(at)gmail(dot)com> wrote:
> 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(at)havleik(dot)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(at)havleik(dot)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(at)postgresql(dot)org)
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgsql-general
> >
From | Date | Subject | |
---|---|---|---|
Next Message | Bjørn T Johansen | 2016-10-20 12:27:08 | Re: Strange? BETWEEN behaviour. |
Previous Message | vinny | 2016-10-20 12:04:51 | Re: Strange? BETWEEN behaviour. |