Random Dates And Times

image\RandomSourcesDatesAndTimesForm.gif

 

Range of Dates

Select this option to generate a range of dates that will fall within the Earliest Date and Latest Date that you specify.

Offset From Current Date at Runtime

A random date that uses the Offset Type criteria you specify will be generated. Date will be offset from the current system date and time as determined at run-time.

Offset From Date in Data Table

A random date that uses the Offset Type criteria you specify will be generated. Date will be offset from the date in the data source field to which the random value is mapped..

Offset Type

Select whether the offset will be expressed as a difference in Years, Months or Days.

Minimum Offset

Maximum Offset

Random offset that is produced will be between the minimum and maximum offsets specified here. The offset number will refer to Years, Months or Days depending upon the Offset Type you select.

 

Offset Example:

Offset from Date in Date Table is selected.

Order Date field in data table is 5/15/2010.

Offset type is Days.

Minimum Offset is -5.

Maximum Offset is +5.

Random output dates will range from 5/10/2010 to 5/20/2010.

Date Sequence

Select this option to generate a sequence of dates that start at the Start Date and end with the End Date.

Date Increment

Specify the number of Years, Months or Days to add when generating the next date in the sequence.

For each date increment

Specify the minimum and maximum number of instances to generate of each date in the sequence.

 

Sequence Example:

Start Date = 1/1/2000

End Date = 12/31/2010

Date Increment = 1 Days

For each date increment = Generate 1 to 3 dates

Specify Time For Each Day is checked.

Output dates will look something like the following:

image\RandomSourcesDatesAndTimesSEQExample.gif

 

Specify Time For Each Day

Select this option if you want to generate a random time to include with each generated date.

Random times will range from Earliest Time to Latest Time.

Convert Output Value From Date/Time to Integer

Select this option to convert random date/time values to integer values that are formatted for use in a data warehousing scenario. Data warehouse tables frequently store dates as integers in yyyyMMdd format for speedier lookups and sorts.

Convert to 32-bit DateKey Integer

yyyyMMdd format

Example:

Date/Time = 1/1/2012 04:15:00 PM

Integer = 20120101

Convert to 32-bit TimeKey Integer

hhmmss format

Example:

Date/Time = 1/1/2012 04:15:00 PM

Integer = 161500

Convert to 64-bit DateTimeKey Integer

yyyyMMddhhmmss format

Example:

Date/Time = 1/1/2012 04:15:00 PM

Integer = 20120101161500