Timestamp sequence

Supported in: Batch

Creates an array with timestamps in range from start to end.

Expression categories: Datetime

Declared arguments

  • End time - The timestamp to end at (inclusive).
    Expression<Date | Timestamp>
  • Start time - The timestamp to start from (inclusive).
    Expression<Date | Timestamp>
  • Step unit - Unit of the step size.
    Enum<Days, Hours, Milliseconds, Minutes, Seconds, Weeks>
  • optional Step size - The size of the steps between numbers. Defaults to 1.
    Expression<Numeric>

Output type: Array<Timestamp>

Examples

Example 1: Base case

Argument values:

  • End time: end_time
  • Start time: start_time
  • Step unit: DAYS
  • Step size: 1.0
start_timeend_timeOutput
2023-01-01T00:00:00Z2023-01-03T00:00:00Z[ 2023-01-01T00:00:00Z, 2023-01-02T00:00:00Z, 2023-01-03T00:00:00Z ]
2023-01-01T01:50:00Z2023-01-03T00:00:00Z[ 2023-01-01T01:50:00Z, 2023-01-02T01:50:00Z ]

Example 2: Base case

Argument values:

  • End time: end_time
  • Start time: start_time
  • Step unit: DAYS
  • Step size: 1
start_timeend_timeOutput
2023-01-012023-01-03[ 2023-01-01T00:00:00Z, 2023-01-02T00:00:00Z, 2023-01-03T00:00:00Z ]

Example 3: Base case

Argument values:

  • End time: end_time
  • Start time: start_time
  • Step unit: DAYS
  • Step size: 1.0
start_timeend_timeOutput
2023-01-03T00:00:00Z2023-01-01T00:00:00Z[ 2023-01-03T00:00:00Z, 2023-01-02T00:00:00Z, 2023-01-01T00:00:00Z ]
2023-01-03T00:00:00Z2023-01-01T01:50:00Z[ 2023-01-03T00:00:00Z, 2023-01-02T00:00:00Z ]

Example 4: Null case

Argument values:

  • End time: end_time
  • Start time: start_time
  • Step unit: DAYS
  • Step size: 1.0
start_timeend_timeOutput
null2023-01-01T00:00:00Znull
nullnullnull

Example 5: Null case

Argument values:

  • End time: end_time
  • Start time: start_time
  • Step unit: DAYS
  • Step size: null
start_timeend_timeOutput
2023-01-03T00:00:00Z2023-01-01T00:00:00Znull
2023-01-01T01:50:00Z2023-01-03T00:00:00Znull

Example 6: Null case

Argument values:

  • End time: end_time
  • Start time: start_time
  • Step unit: DAYS
  • Step size: step
start_timeend_timestepOutput
2023-01-03T00:00:00Z2023-01-01T00:00:00Z0.0null

Example 7: Edge case

Argument values:

  • End time: end_time
  • Start time: start_time
  • Step unit: DAYS
  • Step size: null
start_timeend_timeOutput
2023-01-03T00:00:00Z2023-01-01T00:00:00Z[ 2023-01-03T00:00:00Z, 2023-01-02T00:00:00Z, 2023-01-01T00:00:00Z ]
2023-01-01T01:50:00Z2023-01-03T00:00:00Z[ 2023-01-01T01:50:00Z, 2023-01-02T01:50:00Z ]

Example 8: Edge case

Argument values:

  • End time: end_time
  • Start time: start_time
  • Step unit: DAYS
  • Step size: null
start_timeend_timeOutput
2023-01-03T00:00:00Z2023-01-03T00:00:00Z[ 2023-01-03T00:00:00Z ]