HASHDOB function fails to mask date fields without a defined format
search cancel

HASHDOB function fails to mask date fields without a defined format

book

Article ID: 444315

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

When using the HASHDOB masking function in Fast Data Masker (FDM) or TDM Portal, users observe that date fields are not being masked:

  • The masking job completes successfully without errors (in versions prior to FDM 5.0.19.0).
  • The audit log shows that the NEWVALUE is identical to the OLDVALUE for date columns.
  • This behavior occurs primarily with flat files (CSV, TXT) or database columns using numeric or string data types (e.g., INT, VARCHAR).

Environment

  • CA Test Data Manager (TDM) Portal
  • Fast Data Masker (FDM)

Cause

FDM treats data in flat files and VARCHAR columns as string/character data by default. Unlike native Date data types, these formats do not have an inherent date structure.

If the HASHDOB function is called without a defined date format, FDM cannot parse the value into a valid date object. To avoid data corruption, the function skips the masking process for that field. In older versions, this occurred silently without throwing an error, potentially leaving PII unmasked.

Resolution

To resolve this issue, you must explicitly define the date format in your masking configuration or upgrade to a version that enforces this requirement.

  1. Define the Date Format
    You must provide the date format in the Date Format parameter for the HASHDOB function so FDM can correctly interpret the data.
    • Example (CSV Masking Map): Table,Column,Function,Date Format
                                                        MyTable,BIRTH_DATE_COLUMN,HASHDOB,YYYYMMDD

  2. Upgrade FDM (Recommended)
    A code change was implemented in FDM 5.0.19.0 to prevent silent masking failures. In this version and later, the masking job will explicitly fail if a required date format for HASHDOB or HASHDAYS is missing.
    • Patches: FastDataMasker-5.0.19.0 is available for download from the .

Additional Information

  • For a list of supported date formats, refer to the  documentation.

  • If using flat files, ensure the field is identified correctly in the definition file (.def).
  • If you are masking numeric data types that represent dates (e.g., INT), a date format is also required to ensure correct parsing.