dglux5_wiki:dataflow:dataflow_blocks_reference:date_time_operations:date_range

Date Range

Block Group: Date Time Operations
Icon: Date Range block icon

The Date Range block returns a formatted date and time range based on the defined formatting options.

For information on using dataflow blocks, see Dataflow.

Tip

You can insert the pre-made date range picker component to enable the user to select a range.


Special values can be the following strings:

  • today
  • yesterday
  • thisWeek
  • lastWeek
  • thisMonth
  • lastMonth
  • thisYear
  • lastYear

The following properties of the Date Range block can take input and give output.

  • input (date range)
  • next (trigger)
  • previous (trigger)
  • refresh (trigger)
  • timezone (string)
  • format (string)
  • rangeDelimiter (string)
  • keepSpecial (enum)

input specifies the currently selected range. You can select a range by clicking the property and using the pop-up window.

next advances the value of the input property to the next range of the same duration.

previous changes the value of the input property to the previous range of the same duration.

refresh recalculates the outputs. This is useful for relative ranges such as today, which change over time.

timezone specifies a time zone offset such as +08:00 or -05:00. If set, special values and relative ranges are calculated in that time zone instead of the local time zone.

timezone, format, rangeDelimiter and keepSpecial are hidden in the block by default. You can set them in the Properties panel.

format specifies the date and time formatting string used to format the dates and times in this block. The default is yyyy-MM-ddTHH:mm:ss.

rangeDelimiter specifies the string used to delimit the beginning of the range and the end of the range. The default is /.

keepSpecial specifies when a special value is used as the output properties, versus when the values of the format and rangeDelimiter properties are used. The default is None. The value of the keepSpecial property can be one of the following:

  • None—The format and rangeDelimiter properties are always used, if defined.
  • Raw—The special value is used, if applicable. Otherwise, the format and rangeDelimiter properties are used.
  • Formatted—The special value is used, if applicable. Short default formats are automatically used when available. The format and rangeDelimiter properties are used when necessary.
  • Format Clean—The special value is used, if applicable. Shortened versions of the format property are used when available.

The following properties of the Date Range block can give output but cannot take input.

  • formatted (string)
  • nextRange (date range)
  • thisRange (date range)
  • previousRange (date range)
  • duration (number)

The output properties are hidden in the block by default.

formatted returns the range, formatted according to the format, rangeDelimiter, and keepSpecial properties.

nextRange returns the next range of the same duration after input.

thisRange returns the currently selected range in input.

previousRange returns the previous range of the same duration before input.

duration returns the duration of the currently selected range, in milliseconds.


The following image demonstrates the block properties panel for an example of the Date Range block. In this example, a one-week range has been selected and a format has been defined.

Date Range block example

The following image demonstrates a binding from a Date Range block to the dateRange property of a chart axis.

Date Range block example


  • dglux5_wiki/dataflow/dataflow_blocks_reference/date_time_operations/date_range.txt
  • Last modified: 2026/10/22 16:26
  • by 127.0.0.1