Comparison: Similar Date
The Similar Date comparison determines if two dates are similar by taking dates or date arrays as an input. The comparison will return true for exact dates and dates in which the day and month have been transposed and the years match. In addition, the comparison can be configured to match dates which:
-
Are within a configurable absolute number of days apart
-
Have the same day and month component and the years are within a configurable distance apart
-
Have the same day and month component but have conflicting years
-
Have the same day and year component but have conflicting months
Use the Similar Date comparison to find close matches between dates stored in Date identifiers or dates stored in String identifiers and represented as the number of milliseconds from the epoch.
This comparison does not support the use of result bands.
The following table describes the configuration options:
Option | Type | Description | Default Value |
---|---|---|---|
Match No Data pairs? |
Yes/No |
This option determines the result of a comparison when it compares two No Data (Null, or containing only whitespace characters) values for an identifier. If set to No, the comparison will give a 'no data' result when comparing a No Data value against another No Data value. If set to Yes, the comparison will give a full match (TRUE) when comparing a No Data value against another No Data value. A 'no data' result will only be returned if a No Data value is compared against a populated value. |
No |
Maximum allowed days |
Integer |
Tolerance to consider two dates a match if the day difference between them is less than or equal to than the specified value. |
5 |
Maximum allowed years |
Integer |
Tolerance to consider two dates a match if the day and month match and the year difference between them is less than or equal to the specified value. |
5 |
Allow conflicting Years |
Yes/No |
Specify whether to allow matches between two dates when the day and month are the same but the years are different. |
No |
Allow conflicting Months |
Yes/No |
Specify whether to allow matches between two dates when the day and year are the same but the months are different. |
No |
Example
This example demonstrates the effect of using the Similar Date comparison.
Table 1-54 Example Options: Similar Date
Option | Setting |
---|---|
Match No Data pairs |
No |
Maximum allowed days |
2 |
Maximum allowed years |
2 |
Allow conflicting Years |
No |
Allow conflicting Months |
Yes |
Example results:
Table 1-55 Example Results: Similar Date
Value A | Value B | Comparison Result |
---|---|---|
no data |
no data |
False |
21/01/1985 |
23/01/1985 |
True |
21/01/1985 |
24/01/1985 |
False |
15/02/1971 |
15/02/1969 |
True |
15/02/1971 |
15/02/1968 |
False |
21/01/2014 |
21/09/2014 |
True |
12/01/1945 |
01/12/1945 |
True |