Query not producing expected result - Mailing list pgsql-general

From Chuck Martin
Subject Query not producing expected result
Date
Msg-id CAFw6=U2AisghJ2cOPOWopmk3NVVJ-WcSTNM+6K_-kQVBGxzMaA@mail.gmail.com
Whole thread Raw
Responses Re: Query not producing expected result
Re: Query not producing expected result
Re: Query not producing expected result
List pgsql-general
I need help figuring out why a query is not returning the records I expect it to. I'm searching on a DateTime column (timestamp without time zone - not nullable). The query includes:

 AND event.Primaryresp_fkey = 5000011 AND event.DateTime <= 'May-1-2019'  AND event.EventDone < 1

This does not return a record that has a DateTime value "May 1, 2019 9:52 AM". If I modify the query to:

 AND event.Primaryresp_fkey = 5000011 AND event.DateTime <= 'May-2-2019'  AND event.EventDone < 1

it does return the record in question. I assume I am not doing the data comparison correctly, but don't know why. 

Chuck Martin
Avondale Software

pgsql-general by date:

Previous
From: Charlin Barak
Date:
Subject: Re: Oracle number to PostgreSQL
Next
From: Julien Rouhaud
Date:
Subject: Re: Query not producing expected result