SetOrigin function
The SetOrigin function moves the origin of a time series back in time.
Syntax
SetOrigin(ts TimeSeries,
origin datetime year to fraction(5))
returns TimeSeries;
- ts
- The time series to act on.
- origin
- The new origin of the time series.
Description
If the supplied origin is not a valid timepoint in the given time series calendar, the first valid timepoint following the supplied origin becomes the new origin. The new origin must be earlier than the current origin. To move the origin forward, use the Clip function.
Returns
The time series with the new origin.
Example
The following example sets the origin
of the stock_data time series:
update daily_stocks
set stock_data = SetOrigin(stock_data,
'2011-01-02 00:00:00.00000');