GetInterval function

The GetInterval function returns the interval used by a time series.

Syntax

GetInterval(ts TimeSeries) 
returns lvarchar;
ts
The source time series.

Description

The calendars used by time series values can record intervals of one second, minute, hour, day, week, month, or year. The underlying interval of the calendar describes how often a time series records data.

Returns

An LVARCHAR string that describes the time series interval.

Example

The following query finds all stocks that are not traded on a daily basis:
select stock_name
from daily_stocks
where GetInterval(stock_data) <> 'day';