Overview
Sometimes it is possible that a property calculator rule that compares date properties gives out unexpected results. This article describes a reason for that and a possible workaround.
Solution
The root cause of the issue is that the values of date properties are converted to strings, which are then compared. Format of date string (at least in a tested environment) is dd/MM/yyyy. Comparing these strings will cause different results as expected from date comparison. We have an existing product improvement idea to fix the issue and do the comparing without the string conversion. That might be implemented in the future.
Workaround for the issue is to do conversion elsewhere with defined format and then compare those generated values together. Property Calculator can do this conversion already. It is possible to create new text properties for start date and end date and use calculation rules to set their value with Convert Date mode and format it yyyyMMdd. After that those text versions can be compared together.
In the next page there is a picture of an example workaround configuration that can be tested. Note the direction of comparison. Error is thrown when condition matches; start > end.
