DelClip function

The DelClip function deletes all elements in the specified time range, including the delimiting timepoints, for the specified time series instance. The DelClip function differs from the DelTrim function in its handling of deletions from the end of a regular time series. DelTrim shortens the time series and reclaims space, whereas DelClip replaces elements with null values.

Syntax

DelClip(ts          TimeSeries, 
       begin_stamp datetime year to fraction(5), 
       end_stamp   datetime year to fraction(5)
       flags       integer default 0
) 
returns TimeSeries;
ts
The time series to act on.
begin_stamp
The begin point of the range.
end_stamp
The end point of the range.
flags
Valid values for the flags argument are described in The flags argument values. The default value is 0.

Description

You can use DelClip to delete hidden elements from a time series instance.

If the begin or end point of the range falls before the origin of the time series or after the last element in the time series, an error is raised.

When DelClip operates on a regular time series instance, it replaces elements with null elements; it never changes the number of elements in a regular time series.

Returns

A time series with all elements in the range between the specified timepoints deleted.

Example

The following example removes all elements on the specified day for the specified time series instance:
update activity_stocks
set activity_data = DelClip(activity_data,
        '2011-01-05 00:00:00.00000'
     ::datetime year to fraction(5),
        '2011-01-06 00:00:00.00000'
     ::datetime year to fraction(5))
where stock_id = 600;