From: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | Bjørn T Johansen <btj(at)havleik(dot)no> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Strange? BETWEEN behaviour. |
Date: | 2016-10-20 15:15:17 |
Message-ID: | CAOR=d=2iJuiYmrafvSapY6asLoEkn9r_mLi04F2XQb+XN-ZhDA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Oct 20, 2016 at 6:27 AM, Bjørn T Johansen <btj(at)havleik(dot)no> wrote:
> On Thu, 20 Oct 2016 14:04:51 +0200
> vinny <vinny(at)xs4all(dot)nl> wrote:
>
>> On 2016-10-20 13:51, Bjørn T Johansen wrote:
>> > 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
>> >
>>
>> What are you getting?
>>
>>
>
> The sql returns 5 of the expected 72 rows...
Could you be running into timezone issues?
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2016-10-20 15:18:24 | Re: Unnest an array in postgresql |
Previous Message | Francisco Olarte | 2016-10-20 14:24:26 | Re: Strange? BETWEEN behaviour. |