# Compare TimeStamp Not Working

**URL:** <https://developer.sailpoint.com/discuss/t/compare-timestamp-not-working/82526>\
**Category:** SHF Discussion and Questions\
**Tags:** workflows, sailpoint-identity-security\
**Created:** [September 23, 2024, 3:28pm UTC](https://developer.sailpoint.com/discuss/t/compare-timestamp-not-working/82526 "2024-09-23T15:28:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karthikeyan\_U](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/karthikeyan_u/32/23649_2.png) [@Karthikeyan\_U](https://developer.sailpoint.com/discuss/u/Karthikeyan_U)\
**Post date:** [September 23, 2024, 3:28pm UTC](https://developer.sailpoint.com/discuss/t/compare-timestamp-not-working/82526/1 "2024-09-23T15:28:15Z")

</div>

Hi,

I am working on a workflow to compare the identity history date (AccessItemRemoved ) event date to send out an email. The Timestamp compare is not working as expected and it’seems to be a bug. Anyone come across such issue?

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/d/8/d8d4a602519099e7b75b140a3773001648f65df9.png)

Thanks,  
Karthi

---

<div class="post-metadata">

**Author:** ![mpotti](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/mpotti/32/2916_2.png) [@mpotti](https://developer.sailpoint.com/discuss/u/mpotti)\
**Post date:** [September 23, 2024, 5:21pm UTC](https://developer.sailpoint.com/discuss/t/compare-timestamp-not-working/82526/2 "2024-09-23T17:21:56Z")

</div>

You may need to apply a transform to your set variable call to ensure that the 2 dates are in the same format.

---

<div class="post-metadata">

**Author:** ![Karthikeyan\_U](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/karthikeyan_u/32/23649_2.png) [@Karthikeyan\_U](https://developer.sailpoint.com/discuss/u/Karthikeyan_U)\
**Post date:** [September 24, 2024, 3:42am UTC](https://developer.sailpoint.com/discuss/t/compare-timestamp-not-working/82526/3 "2024-09-24T03:42:11Z")

</div>

Hi Mark,

I don’t think the issue is with dates. In the define variable section I using “now” keyword to get the date, so both the dates are in the same format. I suspect the compare is not working as expected.

Regards,  
Karthi

---

<div class="post-metadata">

**Author:** ![mpotti](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/mpotti/32/2916_2.png) [@mpotti](https://developer.sailpoint.com/discuss/u/mpotti)\
**Post date:** [September 24, 2024, 2:42pm UTC](https://developer.sailpoint.com/discuss/t/compare-timestamp-not-working/82526/4 "2024-09-24T14:42:57Z")

</div>

Are you able to share the input and response json for the compare step? Am wondering if the something is being funny there. Seeing the input and output will be really helpful in figuring out what is going on here.

---

<div class="post-metadata">

**Author:** ![Karthikeyan\_U](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/karthikeyan_u/32/23649_2.png) [@Karthikeyan\_U](https://developer.sailpoint.com/discuss/u/Karthikeyan_U)\
**Post date:** [September 24, 2024, 4:48pm UTC](https://developer.sailpoint.com/discuss/t/compare-timestamp-not-working/82526/5 "2024-09-24T16:48:57Z")

</div>

Hi Mark,

I have attached input, output and the workflow json as well for reference.

Thanks  
[Workflow-output.json](https://developer.sailpoint.com/discuss/uploads/short-url/yYnC5pkVNDKCMeINCp81RlWEKzs.json) (404.7 KB)  
[SLAPRemovalWorkflow20240924 (1).json](https://developer.sailpoint.com/discuss/uploads/short-url/m1PRZeCuyJ9epqsstuVZXojjdBt.json) (3.7 KB)  
[Workflow-Input.json](https://developer.sailpoint.com/discuss/uploads/short-url/7OZOsXef3dE6rD0E7sDlOrlk2I5.json) (1.1 KB)

---

<div class="post-metadata">

**Author:** ![mpotti](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/mpotti/32/2916_2.png) [@mpotti](https://developer.sailpoint.com/discuss/u/mpotti)\
**Post date:** [September 24, 2024, 5:13pm UTC](https://developer.sailpoint.com/discuss/t/compare-timestamp-not-working/82526/6 "2024-09-24T17:13:54Z")

</div>

After looking this over have you tried to set the condition to On or Before? Based on what I am seeing in the out put your current logic would never evaluate as true because the record coming in would not have a future date.

---

<div class="post-metadata">

**Author:** ![Karthikeyan\_U](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/karthikeyan_u/32/23649_2.png) [@Karthikeyan\_U](https://developer.sailpoint.com/discuss/u/Karthikeyan_U)\
**Post date:** [September 24, 2024, 5:29pm UTC](https://developer.sailpoint.com/discuss/t/compare-timestamp-not-working/82526/7 "2024-09-24T17:29:40Z")

</div>

Hi Mark,

Thanks for that, I was using On or After initially for many test cases, none of them were worked. So, thought of using On or Before for one round of testing 🙂

Thanks,  
Karthi

---

<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 23, 2024, 5:30pm UTC](https://developer.sailpoint.com/discuss/t/compare-timestamp-not-working/82526/8 "2024-11-23T17:30:40Z")

</div>

Closed on November 23, 2024, 5:30pm UTC

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