Skip to content
Advertisement

date time comparison with > does not work

I have two SQL statements:

1) (now i use this)

2) (but i need to use this)

first query return 11 lines query 2 return 388.

my observation (about query 2) is that instead of “2019-11-26 13:20:00” it is taken “2019-11-26” and when I replace it really returns the same answer

date_occured is of type of timestamp without time zone

Advertisement

Answer

As your date_occured is a timestamp without time zone field, you would have to indicate it (otherwise your string would be automatically casted as a date):

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement