Skip to main content

Random Date

Goal

Write mask rule logic to

  • generate random dates from an interval defined by <from> and <to> properties
  • The random-date function generates values having standard format YYYY-MM-DD.
    • %tF

Ano Structure and Examples

        ...
mask <column> <rule-name>
format %tF
random-date <from> <to> // [<from>, <to>]
...
  • <from> and <to> values are included in the generated values.
    • Both are written using YYYY-MM-DD format
  • random-date creates values of the format YYYY-MM-DD, the %tF will result in strings of this format.
        For different formats, see Formats
  • Note the lack of double quotes " around the values after the random-date keyword. This is the correct syntax.