# Can I set up relative time filters in Foundry Rules

**URL:** <https://community.palantir.com/t/can-i-set-up-relative-time-filters-in-foundry-rules/806>\
**Category:** Ask the Community\
**Tags:** foundry-rules\
**Created:** [July 23, 2024, 10:20am UTC](https://community.palantir.com/t/can-i-set-up-relative-time-filters-in-foundry-rules/806 "2024-07-23T10:20:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![4b74c51a335df2a25c75](https://yyz1.discourse-cdn.com/palantir/user_avatar/community.palantir.com/4b74c51a335df2a25c75/32/742_2.png) [@4b74c51a335df2a25c75](https://community.palantir.com/u/4b74c51a335df2a25c75)\
**Post date:** [July 23, 2024, 10:20am UTC](https://community.palantir.com/t/can-i-set-up-relative-time-filters-in-foundry-rules/806/1 "2024-07-23T10:20:12Z")

</div>

Hey,

I would like to filter an Order dataset on only the orders of the last 10 months.

Is this possible with Foundry Rules ? Can we have functions-based filters ?

Or do I have to precompute the date from 10 months ago in the dataset ?

Thanks,

Julien

---

<div class="post-metadata">

**Author:** ![aroy](https://avatars.discourse-cdn.com/v4/letter/a/a9adbd/32.png) [@aroy](https://community.palantir.com/u/aroy)\
**Post date:** [July 23, 2024, 3:42pm UTC](https://community.palantir.com/t/can-i-set-up-relative-time-filters-in-foundry-rules/806/2 "2024-07-23T15:42:46Z")

</div>

This is possible using the “expression” board in the foundry rules editor.

For example, `add_date(current_date(), -7)` will generate the date from now minus 7 days. See https://www.palantir.com/docs/foundry/contour/expressions-syntax/ for the full syntax enabled in the expression board.

---

<div class="post-metadata">

**Author:** ![system](https://yyz1.discourse-cdn.com/palantir/user_avatar/community.palantir.com/system/32/3_2.png) [@system](https://community.palantir.com/u/system)\
**Post date:** [January 1, 2025, 7:53am UTC](https://community.palantir.com/t/can-i-set-up-relative-time-filters-in-foundry-rules/806/3 "2025-01-01T07:53:08Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://yyz1.discourse-cdn.com/palantir/user_avatar/community.palantir.com/system/32/3_2.png) [@system](https://community.palantir.com/u/system)\
**Post date:** [June 18, 2025, 5:47pm UTC](https://community.palantir.com/t/can-i-set-up-relative-time-filters-in-foundry-rules/806/4 "2025-06-18T17:47:46Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://yyz1.discourse-cdn.com/palantir/user_avatar/community.palantir.com/system/32/3_2.png) [@system](https://community.palantir.com/u/system)\
**Post date:** [July 26, 2026, 9:06am UTC](https://community.palantir.com/t/can-i-set-up-relative-time-filters-in-foundry-rules/806/5 "2026-07-26T09:06:08Z")

</div>


