Date
The Date transformer is used to output dates.
All values will be written as RFC 3339. When specifying dates in the config they can either be RFC 3339 or RFC 2822.
Alternation
This transformer will not mutate existing row value, it will generate a new value.
Valid Data Types
String
Default
Without specifying any options the date transformer will generate an date with current timestamp.
Options
after
This option is used when you would like to generate a random date after the specified one.
Default value: No default value.
before
This option is used when you would like to generate a random date before the specified one.
Default value: No default value.
between
This option is used when you would like to generate a random date between the specified values.
Default value: No default value.
Examples
Default
The default value will generate a RFC 3339 Date from the current time.
Column value: '2020-01-01T13:00:00-00:00'
Result: '2020-01-01T13:00:00-00:00'
Specifying after
Column value: '2024-01-01T00:00:00+00:00'
Result: '2023-12-21T09:20:41+00:00'
Specifying before
Column value: '2024-01-01T00:00:00+00:00'
Result: '2021-11-18T22:47:41+00:00'
Specifying between
Column value: '2024-01-01T00:00:00+00:00'
Result: '2023-07-28T11:34:41+00:00'