bin_start_time

Description

Returns the start time of the current bin (inclusive).

Typically used with time binning verbs timechart or align. When used with statsby returns the query window start time.

Return type

timestamp

Domain

This is a scalar function (calculates a single output value for a single input row.)

Categories

Usage

bin_start_time()

Examples

timechart 10m, first_to_bin_start:min(timestamp - bin_start_time()), group_by(key)

Create a column named “first_to_bin_start” that contains the difference between the first data point in the bin and the bin’s start time.

statsby least_recent:min(timestamp - bin_start_time()), group_by(key)

Return a dataset with two columns “least_recent”, and “key” where “least_recent” contains the minimum gap between a row’s timestamp and the start of the query window grouped on the “key” column.