Description
The DateToMillisGen Generator converts a formatted date to its equivalent current time in milliseconds.
Example:
- 2001/01/01 12:30:45 -> 978352245000
- 1901/01/01 12:30:45 -> -2177407755000
- 2205/06/26 1:14:10 -> 7431095650000
Note: Dates before 1970 will generate a negative number.
Parameters
The following parameters may be configured for the DateToMillisGen Generator. Items with an asterisk* are required.
- format* - Defines the format of the date to be converted.
- reference* - Defines the Attribute to reference whose Generator generates dates that conform to the date format.
Example 1: Create Milliseconds from Given Dates
This example uses two linked Generators to create milliseconds from given dates generated by one of the Generators. The linked Generators are: FlexibleDateRangeGen and DateToMillisGen.
The reference Parameter references the FlexibleDateRangeGen Generator, as shown below:
Note: To learn more about linking Generators, please see the following knowledge base section: Linked Generators.
FlexibleDateRangeGen Generator configuration is shown below:
Sample Output
gen1 = reference value
gen2 = Result, reference date to milliseconds