# Aerospike date filter

**URL:** <https://discuss.aerospike.com/t/aerospike-date-filter/7837>\
**Category:** General Discussion\
**Created:** [September 15, 2020, 11:35am UTC](https://discuss.aerospike.com/t/aerospike-date-filter/7837 "2020-09-15T11:35:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivanipremi](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/shivanipremi/32/1532_2.png) [@shivanipremi](https://discuss.aerospike.com/u/shivanipremi)\
**Post date:** [September 15, 2020, 11:35am UTC](https://discuss.aerospike.com/t/aerospike-date-filter/7837/1 "2020-09-15T11:35:39Z")

</div>

Hi guys, I am new to the Aerospike, was searching to find out how can I use date filter in aerospike. I am shifting some parts of my application from mongodb to aerospike, so in mongodb i was using $gte and $lte to filter out. How can i perform the same in aerospike?

---

<div class="post-metadata">

**Author:** ![Albot](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/albot/32/2076_2.png) [@Albot](https://discuss.aerospike.com/u/Albot)\
**Post date:** [September 15, 2020, 9:04pm UTC](https://discuss.aerospike.com/t/aerospike-date-filter/7837/2 "2020-09-15T21:04:51Z")

</div>

If you want a one-to-many match that would be a secondary index in Aerospike. The more suggested approach is to instead structure your keys in a way that reflect the date. Ex… key1-2020-09-15 as a composite key, or using maps to append data to a single key, or even scanning based off LUT but there are limitations/pros to each implementation. It would be good to know more about the use case.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/system/32/2274_2.png) [@system](https://discuss.aerospike.com/u/system)\
**Post date:** [September 15, 2021, 9:05pm UTC](https://discuss.aerospike.com/t/aerospike-date-filter/7837/3 "2021-09-15T21:05:16Z")

</div>

Closed on September 15, 2021, 9:05pm UTC

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
