RandomDateTimeRange / New Layer

Create a new column with random datetime values within a specified range. Similar to pandas date_range() with random sampling. Generates datetime values between Start and End at specified IntervalValue steps. Timezone-naive by default.

Table
0
0
Table

Format

string

Format pattern for parsing Start and End dates. Uses strftime syntax. Examples:

  • %Y-%m-%d (e.g., 2024-01-31)
  • %Y-%m-%d %H:%M:%S (e.g., 2024-01-31 15:30:00)
  • %d/%m/%Y (e.g., 31/01/2024)

Start

string

Start datetime (Start) of the range. Must match specified Format. Example: if format is %Y-%m-%d, then 2024-01-01

End

string

End datetime (End) of the range. Must match specified Format and be later than Start. Example: if format is %Y-%m-%d, then 2024-12-31

None

Precision of datetime values, affecting storage and computation granularity

None ~

Date-only values, no time component

Ns ~

Nanosecond precision (10^-9 seconds) - highest precision available

Us ~

Microsecond precision (10^-6 seconds) - common for high-resolution timestamps

Ms ~

Millisecond precision (10^-3 seconds) - typical for most applications

Closed

enum
Left

Controls inclusion/exclusion of boundary dates, similar to pandas interval notation [start, end] or (start, end).

Left ~

Include start, exclude end [start, end) - like range() in Python

Right ~

Exclude start, include end (start, end] - useful for end-of-period calculations

Both ~

Include both start and end [start, end] - for inclusive ranges

Neither ~

Exclude both start and end (start, end) - for strictly interior points

Time step size as a duration string. Determines the possible values for random selection. Examples:

  • 1d (daily steps)
  • 1h30m (1.5 hour steps)
  • 1mo (monthly steps)
  • 1y (yearly steps)

Available units: ns (nanosecond), us (microsecond), ms (millisecond), s (second), m (minute), h (hour), d (day), w (week), mo (month), q (quarter), y (year)

Name for the new column. If not provided, the system generates a unique name. If AsColumn matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.