- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
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.
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:
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
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.
Then when we reran the process, it went processed successfully again.
Test #4 - Finally, changing the Action date to something less than today's date worked correctly
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.