TIME comparison

Compares values in DataStage® and QualityStage® time or character columns in the format of HHMM or HHMMSS. TIME assigns proportionate weights to time differences that fall between an exact match and the maximum difference that you allow.

Time values must be specified in 24-hour format, where 0 is midnight and 2359 (HHMM) is 11:59 PM or 235959 (HHMMSS) is 11:59:59 PM. Times can cross midnight since the difference is always the shortest way around the clock. You can specify an acceptable maximum time difference in minutes.

Required Columns

The following data source and reference source columns are required:

  • Data. The time from data source.

    You can use this comparison with vectors and reverse matching. If you want to create vectors to use in the Match Designer, see Make Vector stage in DataStage.

  • Reference. The time from reference source (only applies for a two-source match).

Required Parameters

Parameter 1 is required, Parameter 2 is optional:

  • Param 1. The maximum time difference that can be tolerated. If you specify a value for only the Param 1 parameter, this value is the difference that can be tolerated for either data source time greater than reference source time or reference source time greater than data source time. If you specify both parameters, the value for theParam1 parameter is the difference that can be tolerated for reference source time greater than data source time.
  • Param 2. (Optional) The maximum time difference that can be tolerated when reference source time is less than data source time.

Example 1

A difference of zero between the two times results in the full agreement weight being assigned. A difference greater than the absolute amount results in the disagreement weight being assigned. Any difference between zero and the specified maximum time difference receives a weight proportionally equal to the difference.

Suppose you specify 10 for the Param 1 parameter. If the times differ by 12 minutes, the comparison receives the full disagreement weight. If the times differ by 5 minutes, the comparison receives a weight between the agreement and disagreement weight.

Example 2

If you want the tolerances to be different for the data and reference sources, use both parameters. Suppose you specify 20 for the Param 1 parameter and 14 for the Param 2 parameter. In that case, the reference source value can exceed the data source value by 20 minutes, but the data source value can exceed the reference source value by 14 minutes.