# \[BUG\] Can't filter by date properly on GraphQL

**URL:** <https://community.prismic.io/t/bug-cant-filter-by-date-properly-on-graphql/12552>\
**Category:** Developing with Prismic\
**Tags:** graphquery, graphql\
**Created:** [February 27, 2023, 2:10pm UTC](https://community.prismic.io/t/bug-cant-filter-by-date-properly-on-graphql/12552 "2023-02-27T14:10:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![g.rosado](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/g.rosado/32/5771_2.png) [@g.rosado](https://community.prismic.io/u/g.rosado)\
**Post date:** [February 27, 2023, 2:10pm UTC](https://community.prismic.io/t/bug-cant-filter-by-date-properly-on-graphql/12552/1 "2023-02-27T14:10:44Z")

</div>

Hi. I think I found a bug relating to the filter functions on GraphQL.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/2X/7/7842e6c0dbf1faedf91ba687ccb63f8ba70bf814.png)

I'm trying to show all "trips" that are on a specific month. In my query, I filter the trips by selecting a month; therefore, I filter by the range from day 0 to the final day of that specific month.

What I found is that when I filter this way it does so incorrectly. It gives me trips that are outside of that range.

Possible reproduction:

- Create documents
- Filter by month by providing a range like `datefrom_after: "2023-07-01", dateto_before: "2023-07-30"`

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [February 27, 2023, 5:53pm UTC](https://community.prismic.io/t/bug-cant-filter-by-date-properly-on-graphql/12552/2 "2023-02-27T17:53:41Z")

</div>

Hey @g.rosado, can you send us your repository's URL and full query so we can run a test?  
You can send it in a message if you prefer. I send you a dm that you'll see in your inbox.

---

<div class="post-metadata">

**Author:** ![g.rosado](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/g.rosado/32/5771_2.png) [@g.rosado](https://community.prismic.io/u/g.rosado)\
**Post date:** [March 5, 2023, 5:20pm UTC](https://community.prismic.io/t/bug-cant-filter-by-date-properly-on-graphql/12552/4 "2023-03-05T17:20:44Z")

</div>

I've sent you a dm! Not sure if I did it correctly haha

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [March 6, 2023, 4:39pm UTC](https://community.prismic.io/t/bug-cant-filter-by-date-properly-on-graphql/12552/5 "2023-03-06T16:39:52Z")

</div>

I've received it. We can continue the conversation there.
