GetOrigin function
The GetOrigin function returns the origin of the time series.
Syntax
GetOrigin(ts TimeSeries)
returns datetime year to fraction(5);
- ts
- The source time series.
Description
Every time series value has a corresponding calendar and an origin within the calendar. The calendar describes how often data values appear in the time series. The origin of the time series is the first timepoint within the calendar for which the time series can contain data; however, the time series does not necessarily have data for that timepoint. The origin is set when the time series is created, and it can be changed with SetOrigin.
Returns
The time series origin.
Example
The following example returns the time stamp of the origin of the time series for a given
stock:
select GetOrigin(stock_data)
from daily_stocks
where stock_name = 'HCLTECH';