Skip to main content


Interana Docs

Specify relative time in a query

In most of your queries, you will want to specify a time range other than the default setting. In the basic queries you used to create a board and add a panel and modify a query, you accepted the default time settings of Starting 7 days ago and Ending now.

This article explains how Interana handles relative time, and then demonstrates how to use relative time settings in a query

This article is specific to Time view. Time view is the default graph displayed for Explore view.

How Interana handles relative time

Familiarize yourself with the following concepts before you specify custom relative time values in queries:

Relative values

When you construct a query, you specify the time over which the query will scan for results by choosing intervals from drop-down menus or entering custom values. The sentence model query builder allows you to specify non-uniform intervals, such as year, month, and calendar quarter, as well as uniform intervals such as seconds, minutes, hours, and days.

The following table explains the delimiters used with non-uniform time intervals.

Time interval Relative value
Beginning of time Start of first event
Now Current time
Yesterday Preceding day


  • Hour
  • Day
  • Week
  • Month
  • Year

The current

  • Hour
  • Day—00:00:00 to 23:59:59
  • Week—Sunday 00:00:00 to Now
  • Month 
  • Year


  • Week
  • Month
  • Year

Immediately preceding

  • Week—Sunday 00:00:00 to Saturday 23:59:59 of previous week
  • Month
  • Year

Previous (N)

  • Hour
  • Day
  • Week
  • Month
  • Year

N preceding

  • Hour
  • Day
  • Week
  • Month
  • Year

Snapping behavior

You can specify an exact time to snap to in the Explorer time windows, for example by typing 12:12:42 exactly in the time field. If you do not specify a custom snap time, the following defaults are used.

Time interval Snap default
Minutes Are exact
Hours Start at the top of the hour
Days Start at 00:00:00
Weeks Start on Sunday at 00:00:00
Months Start on the 1st at 00:00:00

Calendar quarters

Start on

  • 1/1 at 00:00:00
  • 4/1 at 00:00:00
  • 7/1 at 00:00:00
  • 10/1 at 00:00:00
Years Start on 1/1 at 00:00:00

For example, if your time range is specified as 4 weeks, by default Interana snaps to the beginning of the week (Sunday at midnight). In contrast, if you specify 28 days, Interana snaps to today at midnight.

Time scrubber

The time scrubber at the bottom of the Explore window provides an interactive method for focusing portions of query data with finer granularity.

The time scrubber rounds the start and end values to the nearest 15 minutes, if the selected time range is less than 48 hours. If the you scrub beyond 48 hours, the start and end values snap to the start and end of the selected days.


Relative time windows

The time range you specify determines the default display for time resolution. The resulting display is appropriate for the selection, as follows. 

Selection Time resolution
Day 1 hour increments
N days 1 day increments
Week 1 day increments
N weeks 1 day increments
Month 1 day increments
N months (if n < 12) 1 week increments
N months (if n > 12) 1 month increments
Quarter 1 week increments
N quarters 1 month increments
Year 1 month increments
N years 1 month increments

Using relative time settings in a query

You can specify relative start and end times for a query, as well as set the data point resolution and aggregation interval.

Specify relative start and end times

This section shows the various ways in which you can specify relative start and end times. The following examples show are for setting relative start times. However, these methods are the same for specifying relative end times.

  • Click the green text and make a selection from the drop-down menu.


  • Click the calendar icon, select a day, then specify hours, minutes, and seconds by clicking the respective Up and Down arrows.


  • Click inside the green text, type the desired value, and select or specify the relative time interval.


Set the data point resolution and aggregation interval

You can specify the resolution of data points plotted on the Time view graph, as well as setting the aggregation interval over which the data points are scanned. These settings determine the granularity of events for the query.


A trailing aggregation interval can also be set for actor and event properties. If the trailing aggregation interval for an actor or event property differs from that specified for the query, the actor or event property trailing aggregation setting takes precedence. 

To set the data point resolution and aggregation interval, do the following:
  1. Click with time options... Default options are shown initially.


  1. To set the data point resolution, click the first auto option and choose from the drop-down list. The aggregation (trailing) interval changes to match your selection.


  1. To specify a different aggregation interval, click the option and choose from the drop-down list, OR type a new interval.


What's Next

Now that you know how to create basic queries and flows, and how to specify relative time, try these procedures:

  • Was this article helpful?