I need to correct something I wrote earlier:
This implies that in normal circumstances the two tests should return the same result and that the only difference is the unnecessary complexity added by using PatternCount() instead of a direct comparison.
That is not the case.
Let's assume that both of the compared fields are calculation fields returning a result of type Date. And that the date format used by the file is m/d/y, with no leading zero for the month.
Now, let's have an example where DateA is Feb 2, 2025 and DateB is Dec 2, 2025. These two are different dates and if the comparison is performed in the date domain:
DateB = DateA
the result will be False.
But the suggested comparison:
PatternCount ( DateB ; DateA )
will start by converting the dates to Text, and then:
PatternCount ( "12/2/2025" ; "2/2/2025" )
will return 1 (True).
In addition to a false positive, it is also possible to get a false negative if one or both of the fields contains user-entered data which may or may not have leading zeros.