Datetime format change the number of returned rows in PostgreSQL -
i dont this...
this first statement below returns expected rows - rows have date before/smaller than...
select matchdate, price, size, issell matchmsg matchdate <= '2015-01-17 00:00:00.000000+01' order matchdate asc
the code below return rows dates 2015-01-21...!?
select matchdate, price, size, issell matchmsg matchdate <= 'sat jan 17 2015 00:00:00 gmt+0100' order matchdate asc
ps: use postgressql, nodejs , npm moment...but result postgresql tool pgaminiii...so - has nothing own code...!
matchdate in db "datetime time zone" like:
"2015-01-16 00:00:22.491956+01"
postgresql not understand dates of format sat jan 17 2015 00:00:00 gmt+0100
it's trying best. here tables of dates , time formats understand. a complete explanation can found here.
you'll have convert sat jan 17 2015 00:00:00 gmt+0100
format postgres understands. close the http date format.
Comments
Post a Comment