'How to only get last 30 days of contntent in strapi

hope you are all having a good week so far.

I'm trying to only fetch the last 30 days of posts on my strapi back end but can't seem to figure it out...

this is what I have so far:

`/api/updates?created_at_gte=2022-04-03&created_at_lte=2022-05-03` 

but for some reason it's still fetching all posts ...

Actually I would like it to be by the published date though is there a way to do that?

Thank you in advance



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source