# Getting last 6 months of data from today's date in a REST api call

**URL:** <https://community.postman.com/t/getting-last-6-months-of-data-from-todays-date-in-a-rest-api-call/25530>\
**Category:** Help Hub\
**Created:** [July 6, 2021, 6:15pm UTC](https://community.postman.com/t/getting-last-6-months-of-data-from-todays-date-in-a-rest-api-call/25530 "2021-07-06T18:15:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthowell](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@matthowell](https://community.postman.com/u/matthowell)\
**Post date:** [July 6, 2021, 6:15pm UTC](https://community.postman.com/t/getting-last-6-months-of-data-from-todays-date-in-a-rest-api-call/25530/1 "2021-07-06T18:15:41Z")

</div>

_My question_:  
I’m using PM to test out Sharepoint REST apis and need a call that GETs all news posts first published in the last 6 months. The “firstpublisheddate” field is a date field, so I need a filter like:  
firstpublisheddate ge today minus 183 days.  
Can I use the {{$timestamp}} variable to get today’s date and if so how would I reflect the last 6 months?  
Or should I use “moment” as mentioned in the below question with a .subtract(183, ‘days’)?  
[https://community.postman.com/t/postman-todaydate-variable-to-get-past-dates/22290](https://community.postman.com/t/postman-todaydate-variable-to-get-past-dates/22290)
