Randomize DateTime Mask
The Randomize DateTime mask will randomize the Day and optionally the Month of date type fields (not string fields.)
This is particularly useful when you want to ensure that implied date boundaries are observed such as ensuring that randomized dates stay within the same month or the same year.
For example, suppose that your organization applies different tariffs based upon the month of the year. Therefore, in order to maintain consistency with other dependent data, you want to randomize only the Day part while preserving the Month and Year parts of such date fields.
Note that the Year part is always preserved and that the Day part is always randomized.
The Month can be randomized or preserved.
Dates generated by this mask shall always be valid calendar dates and observe leap years.
The remaining components (hours, minutes, seconds, fraction of a second) can be either preserved or a fixed replacement value specified.
A sample mask is shown below.
Hour, Minute, Second and Fraction Fields
Each of the Hour, Minute, Second and Fraction parameter fields shall always be displayed in the mask panel, regardless of whether the component is actually used in the masked value. For example, if the datetime value does not have a fractional part then this setting shall be ignored at runtime. The format definition of the actual datetime values is specified in the Format tab.
For example, none of these parameter fields shall be displayed for SQL Server "date" type. Another example, the Fraction parameter field shall not be displayed for Oracle "DATE" type.
Each of these parameters can either be 'Preserve' or 'Value'. If 'Value' is selected then an input field for a value specification shall be displayed. The screen capture above shows that Hour has been set to a value of 14.
The valid Hour value range is from 0 to 23 inclusive.
The valid Minute value range is from 0 to 59 inclusive
The valid Second range is from 0 to 59 inclusive.
The valid Fraction range is from 0 to 999999999 inclusive.
The Format tab defines how the original date/time value is to be parsed and how it should be formatted for output.
The output format defaults to same as input.
The radio buttons allow you specify from where this mask should source its format definition.
If you have many date/time fields that use the same format then it may be convenient to specify the format only once under the main Project Settings' Format tab and select this form's 'Use Date/Time format in Project Settings'.
Test formatting of sample input value
This section of the Format tab lets you test whether the formatting string(s) specified are performing as expected.
Specify a sample value and click on the Test... button. FileMasker shall then attempt to parse this datetime value using the input and output format strings specified and display the value formatted for output.
Please refer to DateTime Formatting Strings.
When this mask is used in deterministic mode then the same masked value shall always be generated for a given input value.
All mappings are 1-to-1 which means there are no collisions. i.e. Two different input values will always generate two distinct values.
This mask shall produce the same masked datetime values as a DataVeil Randomize DateTime mask that is configured identically and using the same deterministic seed value.
When this mask is used in non-deterministic mode then different masked values are likely to be generated for each occurrence of a given input value, even during the course of a single masking run.
Mappings are many-to-many which means that collisions are possible. i.e. Two different input values may generate the same masked value.