How to search a model by date with Flask-Restless How to search a model by date with Flask-Restless flask flask

How to search a model by date with Flask-Restless


Davidism is absolutely right, I shouldn't have said JSON datetime-- JSON doesn't itself have a way of representing a date/datetime format— it's on the sender/reciever ends of the communication to recognise "Hey, I'm expecting a date here, this looks like a date, I'll try and treat it like one".

Generally, most people use ISO 8601 as their datetime representations in JSON (2014-10-23T18:25:43.511Z), and Flask-Restless seems to use dateutil.parse to parse some incoming values back into datetime fields-- but oddly, not GET ones.

So it looks as though the string representing your datetime value needs to match what your database expects-- which on average is going to be an ISO 8601 format.