# Show records for the next 6 months

**URL:** <https://community.stackerhq.com/t/show-records-for-the-next-6-months/433>\
**Category:** How do I?\
**Created:** [July 6, 2022, 8:01am UTC](https://community.stackerhq.com/t/show-records-for-the-next-6-months/433 "2022-07-06T08:01:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevindax](https://avatars.discourse-cdn.com/v4/letter/k/f9ae1b/32.png) [@kevindax](https://community.stackerhq.com/u/kevindax)\
**Post date:** [July 6, 2022, 8:01am UTC](https://community.stackerhq.com/t/show-records-for-the-next-6-months/433/1 "2022-07-06T08:01:01Z")

</div>

I have a table in Airtable with driver’s licenses and here, among other things, a field with the expiration date of the driver’s licenses. Is it somehow possible that I only display entries in Stacker for which the date is less than 6 months (i.e. in the next 180 days). ? I can’t get my result with the normal date filter.

I can also create a view in Airtable that contains my desired filter. But I also can’t find a way to display it in a new layout instead of the main table.

Many Thanks

 ![CleanShot 2022-07-04 at 19.50.51@2x](https://europe1.discourse-cdn.com/flex017/uploads/stacker/original/1X/efd669105ee2ff83a7abc793166d9e3e65e84da2.png)  
 ![CleanShot 2022-07-04 at 19.55.00@2x](https://europe1.discourse-cdn.com/flex017/uploads/stacker/original/1X/713ef6ae05f5f035191e33047a613e2ea3f7e451.png)

---

<div class="post-metadata">

**Author:** ![oli](https://dub1.discourse-cdn.com/flex017/user_avatar/community.stackerhq.com/oli/32/389_2.png) [@oli](https://community.stackerhq.com/u/oli)\
**Post date:** [July 6, 2022, 8:29am UTC](https://community.stackerhq.com/t/show-records-for-the-next-6-months/433/2 "2022-07-06T08:29:54Z")

</div>

Hey Kevin, here’s my solution to this:

I did it in two stages:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/stacker/original/1X/3022a39ec6720bd51f30efdb23874ea470075438.jpeg)

**1 Calculate the difference between today’s date and the end date using this formula:**

`DATETIME_DIFF(`  
` {End Date},`  
` NOW(),`  
` 'days'`  
`)`

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/stacker/original/1X/d78c224827d918606102e770ee5a4203d46b15bd.png)

**2 If that amount is less than 180, return “yes”**

`IF({Difference in days} < 180, "yes", "no")`

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/stacker/original/1X/42026900764682e846e210d07c92fd1e31681824.png)

(I realise as I type this that you’ll probably want to set up an AND to make sure the Difference in days is greater than zero) - here’s Airtable support: [https://support.airtable.com/hc/en-us/articles/360058237054-Evaluate-arguments-using-AND-and-OR-](https://support.airtable.com/hc/en-us/articles/360058237054-Evaluate-arguments-using-AND-and-OR-)

3 I then used a filter based on “Should it be displayed” within Stacker. Worth reading this post about how filters work from a security perspective: [https://support.stackerhq.com/hc/en-us/articles/4416415857171-List-Filter](https://support.stackerhq.com/hc/en-us/articles/4416415857171-List-Filter)
