| Block Group: | Date Time Operations |
| 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.
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:
The following properties of the Date Range block can take input and give output.
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:
The following properties of the Date Range block can give output but cannot take input.
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.
The following image demonstrates a binding from a Date Range block to the dateRange property of a chart axis.