Is there a way to query dates which are stored in the Mongo format (2010-04-29T00:00:00.000Z), or possibly another format, using the REST API? For example, if I have a column in my collection called date, could I query all the dates that are later than a certain date in my query?
1 person has this question
about 5 years ago
Hi Stephen, since you would store your dates as strings, you can simply use the Mongo comparison operators (http://docs.mongodb.org/manual/reference/operator/query/#comparison) to compare them against a date string of your choice. For example, the following query will return all entities creates on or before 2010-04-29: