The CDATE standardization function is part of the algorithm solution that is used to compare incomplete, partially valid or approximate date, or partially valid and approximate date ranges. The solution includes the CDATE standardization, bucketing, generation, and comparison functions.
The date range is specified by a resolution parameter that is given by the number of days, months, or years that are prefixed by D, M, or Y. For instance given a resolution value of M4, the date range is then four months before and after the given date.
The CDATE function has a length limitation of 19 digits. If the value of the length of the CDATE field is over 19 digits, the operational server truncates the input value to the first 19 digits of the value.
- Output Type
- numeric (date)
- dateval, resolution
- min year, max year, resolution
- MinFldArgs, MaxFldArgs
- Number of standard roles
- The input to the function comes from an implementation-defined segment (for example, mpi_idsdate, with input fields defined as varchar.)
- The resolution parameter can be specified as part of the dvdargs (a single resolution for all the dates) or it can be specified individually for each input date. To specify individually for each input dateval, you must specify the input with two fields - dateval and resolution. Then you specify these two fields in the fldargs parameter in the properties settings in InfoSphere® MDM Workbench for CDATE. All valid resolutions must be prefixed by a Y', ‘M' or ‘D'. Any other prefix is considered invalid and the date/resolution for the member is treated as an anonymous value. If a resolution value is not specified in the dvdargs, implying an exact date, the default resolution value of D0 is used.
- The date parts (day, month, and year) are stored separately, together with the resolution parameter to get a four-part comparison role. The dateval part of the standardized string is standardized much like the DATE2 standardization function. The only difference from DATE2 is that if a transposed date is used in the output, it is not with a prefixed 'T'.
- The standardized string from CDATE is of the form YYYY.MM.DD.RESOLUTION.
For example, if the Date were
resolution that is specified as D36 (implying 36 days), then the standardized
string would be