Skip to content

TSTool / Command / SetOutputPeriod


The SetOutputPeriod command sets the output period for time series. See also the SetInputPeriod command. The period for a time series when read or created will be set to the maximum of the following periods, in order to satisfy output and data filling requirements:

  • available data
  • output period (if specified)
  • input period (if specified)

Specifying the output period is necessary when creating model files or filling an extended period (time series will not automatically be extended by fill commands).

Command Editor

The following dialog is used to edit this command and illustrates the syntax of the command. Note that the output period should always use calendar month and year, even if other than calendar year are used for output (see SetOutputYearType).


SetOutputPeriod Command Editor (see also the full-size image)

Command Syntax

The command syntax is as follows:


Command Parameters

Parameter                 Description Default               
The date/time to for the output start:
  • A date/time string (see dialog above for examples).
  • CurrentToYear, CurrentToMonth, CurrentToDay, CurrentToHour, CurrentToMinute, indicating the current date/time to the specified precision. By default the local time zone on the computer will be assigned and will be used in output when the date/time includes time. To omit time zone, use the Timezone() modifier as shown in the following table.
  • A Current* value +- an interval, for example. See modifiers in following table.
  • A processor property indicated with ${Property}
None – must be specified.
The date/time to for the output end. See the description for OutputStart. None – must be specified.

The CurrentToYear and other special date/time values can be followed by modifiers, which can be chained together in any order. For example, the following will adjust the current time rounded to 5 minutes into the future and set the time zone to blank:


CurrentTo* Modifiers

Modifier                                Description
Round(interval) Round the current date/time to the specified interval (e.g., 5min, 6hour). No rounding occurs if the current date/time exactly matches the requested rounding interval. The default is to round back but see the RoundDirection() modifier.
RoundToDayOfWeek(Day) Round the current date/time to the specified day of the week (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, or Sunday). The day is rounded and the month and year are adjusted accordingly. No rounding occurs if the current date/time matches the requested day of the week. The default is to round back but see the RoundDirection() modifier.
Indicate which way the Round() modifier should round the date/time, one of:
  • < - round to the nearest past even interval
  • > - round to the nearest future even interval
TimeZone(tzToSet) Set the time zone for the date/time to the specified time zone string. This does not shift the time value. It simply assigns the time zone string. Blank (no value) can be used to set the time zone to blank. Note that other commands may handle time zone in a specific way, for example when reading and writing data.


See the automated tests.

A sample command file example is as follows:



See Also