The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Mike S1
Tera Contributor

We were doing some testing with dates in flow designer and ran across a scenario where date comparisons weren't working the way we expected. Here's a summary of what we saw in case anybody runs into it. I did a test in my PDI to show the scenarios.

 

First, here's how I set up the test for today, 09/22/25. Just a new Action that returns a basic date output in a couple formats. Everything was of type Date/Time for both sets of outputs from both the script and then the Action as a whole.

 

MikeS1_0-1758548408201.png

 

 

MikeS1_1-1758548408202.png

 

Test #1 - We were comparing a date extracted from a JSON object and comparing to see if it was before or after a system generated date. So running that compared against the Date/Time coming back from the Action gave us this:

 

MikeS1_2-1758548408202.png

 

 

Test #2 - Leaving the variable types the same in the Action and then changing the script to return 2025-10-21 allowed the comparison to go through properly

 

MikeS1_3-1758548408202.png

 

Test #3 - Finally, we switched the local Flow Variable that we had initially put in as Date/Time over to a String and then left everything else the same.

 

MikeS1_4-1758548408202.png

 

Then when we reran the process, it went processed successfully again.

 

MikeS1_5-1758548408203.png

 

Test #4 - Finally, changing the Action date to something less than today's date worked correctly

 

MikeS1_6-1758548408204.png

So from the screen shots it appears this is always compared as a String and only the format matters. I would have expected the system to know how to compare two date types, but it doesn't seem to work that way.