# Fetch via date query on mongodb

**URL:** <https://community.dreamfactory.com/t/fetch-via-date-query-on-mongodb/884>\
**Category:** REST API\
**Created:** [February 25, 2015, 9:25am UTC](https://community.dreamfactory.com/t/fetch-via-date-query-on-mongodb/884 "2015-02-25T09:25:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![akash](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/akash/32/233_2.png) [@akash](https://community.dreamfactory.com/u/akash)\
**Post date:** [February 25, 2015, 9:25am UTC](https://community.dreamfactory.com/t/fetch-via-date-query-on-mongodb/884/1 "2015-02-25T09:25:01Z")

</div>

How would I fire a query on date field of mongodb like greater than, less than, or equal to particular date, through dreamfactory rest apis?  
Please help

---

<div class="post-metadata">

**Author:** ![jeffreystables](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/jeffreystables/32/173_2.png) [@jeffreystables](https://community.dreamfactory.com/u/jeffreystables)\
**Post date:** [August 14, 2015, 2:30pm UTC](https://community.dreamfactory.com/t/fetch-via-date-query-on-mongodb/884/2 "2015-08-14T14:30:16Z")

</div>

You would POST a JSON body with the filter parameters you wish to use.

[This blog post](https://blog.dreamfactory.com/blog/bid/339945/NoSQL-No-Problem-MongoDB-Specifics) covers it in detail. [This forum thread](https://community.dreamfactory.com/t/dsp-mongodb-filter/1275/2?u=jeffreystables) also provides examples.

E.g., from the blog, to retrieve records where `date > 2012-01-01T00:00:00.000` the included filter payload would be

```
{"filter": { "date": { "$gt": "2012-01-01T00:00:00.000" } } }

```
