# Search Identity Attributes using Relative Date Comparisons

**URL:** <https://developer.sailpoint.com/discuss/t/search-identity-attributes-using-relative-date-comparisons/81444>\
**Category:** SHF Discussion and Questions\
**Tags:** sailpoint-identity-security\
**Created:** [September 16, 2024, 6:30pm UTC](https://developer.sailpoint.com/discuss/t/search-identity-attributes-using-relative-date-comparisons/81444 "2024-09-16T18:30:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wvandeus](https://avatars.discourse-cdn.com/v4/letter/w/3bc359/32.png) [@wvandeus](https://developer.sailpoint.com/discuss/u/wvandeus)\
**Post date:** [September 16, 2024, 6:30pm UTC](https://developer.sailpoint.com/discuss/t/search-identity-attributes-using-relative-date-comparisons/81444/1 "2024-09-16T18:30:40Z")

</div>

I’m having trouble Searching Identity Attributes using Relative Date Comparisons.

Fact number 1)  
I’m able to search for my attribute “searchEndDate” (which is in ISO8601 format) using an exact value of January 8th 2024 (keep in mind, that date value is within this year, around 250 days ago)

 ![Attributes searchEndDate exact value](https://global.discourse-cdn.com/sailpoint/original/3X/0/b/0b563a259558fda91d1744e498f0f5c6cd9908fc.jpeg)

Fact number 2)  
I’m able to search for accounts “created” (which is a different built-in attribute I think?) using Relative Date Comparisons, this will gather any created in the past year (365 days)

 ![Created Relative Date Comparisons](https://global.discourse-cdn.com/sailpoint/original/3X/b/7/b7f4161a65cd9df5feff3871df539475e4f658c5.jpeg)

Fact number 3)  
The Sailpoint documentation suggests this is supported, it even has an example which shows “Identities with an endDate attribute set to within the next year”

 ![theirDoco](https://global.discourse-cdn.com/sailpoint/original/3X/1/c/1cd8c373397fc681f994fd46b7eb9f917da319d4.jpeg)

The problem)  
When I search for my previously mentioned “searchEndDate” attribute using Relative Date Comparisons (any searchEndDate in the past year 365 days) it’s finding no results. At the very least, it should be finding my Fact-number-1 which was 250 days ago.

 ![Attributes searchEndDate Relative Date Comparisons](https://global.discourse-cdn.com/sailpoint/original/3X/b/6/b64d6729a85b0a725b060fd3cb5a3eba4e33d104.jpeg)

If you need more information, like if you want a screenshot of the transform setting my ISO8601, or something else.

Or if you have suggestions or other things to test, I’m happy to hear it.

---

<div class="post-metadata">

**Author:** ![liamkokeeffe](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/liamkokeeffe/32/29279_2.png) [@liamkokeeffe](https://developer.sailpoint.com/discuss/u/liamkokeeffe)\
**Post date:** [September 16, 2024, 7:49pm UTC](https://developer.sailpoint.com/discuss/t/search-identity-attributes-using-relative-date-comparisons/81444/2 "2024-09-16T19:49:59Z")

</div>

Hi William,

In order to do relative date searches, the attribute must be a default date attribute (eg. endDate, created, etc) or the technicalName of the custom attribute must end with ‘dateType’. Try modifying your current attribute technicalName from ‘searchEndDate’ to ‘searchEndDateType’.

There’s a brief section in the ISC Admin Guide under the Search tab on this.

 ![Screenshot 2024-09-16 at 12.48.22 PM](https://global.discourse-cdn.com/sailpoint/original/3X/7/e/7e5e314bcc1f485e682869c192943150123aee22.png)

Thanks,

Liam

---

<div class="post-metadata">

**Author:** ![wvandeus](https://avatars.discourse-cdn.com/v4/letter/w/3bc359/32.png) [@wvandeus](https://developer.sailpoint.com/discuss/u/wvandeus)\
**Post date:** [September 17, 2024, 8:40pm UTC](https://developer.sailpoint.com/discuss/t/search-identity-attributes-using-relative-date-comparisons/81444/3 "2024-09-17T20:40:06Z")

</div>

Thank you, it worked!

(just to clarify for anyone else reading this later, you actually have to create a new attribute with the words dateType at the end of new attribute name. I originally thought Liam was saying I could just search for my existing attribute with the words “dateType” added in the search screen, but that’s not how it works)

---

<div class="post-metadata">

**Author:** ![liamkokeeffe](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/liamkokeeffe/32/29279_2.png) [@liamkokeeffe](https://developer.sailpoint.com/discuss/u/liamkokeeffe)\
**Post date:** [September 17, 2024, 9:28pm UTC](https://developer.sailpoint.com/discuss/t/search-identity-attributes-using-relative-date-comparisons/81444/4 "2024-09-17T21:28:46Z")

</div>

Sorry for the confusion there, but glad it works now!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [November 16, 2024, 9:29pm UTC](https://developer.sailpoint.com/discuss/t/search-identity-attributes-using-relative-date-comparisons/81444/5 "2024-11-16T21:29:14Z")

</div>

Closed on November 16, 2024, 9:29pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
