VMware ESXi and vSphere Cluster Management

Using the Time Range Picker in Splunk Searches

Learn how Splunk's time range picker sets search boundaries using all-time, preset, relative, real-time, date, and precise date-and-time ranges.

The time range picker is the search interface control used to set the time limits for returned events. It appears next to the search bar in Splunk. Before running a search, use it to define when events must have occurred.

Narrowing the time window helps focus an investigation on the period when an issue occurred. It can also reduce the number of events Splunk must examine and make search results easier to interpret.

Default search time range: All time

Splunk searches use All time by default when no narrower range is selected. This setting searches across all available indexed time, so results may include events from a very large period.

Time range picker options

Range typeWhen to use itExample selectionBoundary behavior
All timeWhen the investigation may involve any indexed periodAll timeNo narrower time boundary is applied; Splunk searches all available indexed time.
Preset time rangesWhen a common, ready-made period matches the investigationYesterday; Last 24 hoursSplunk applies the boundaries defined by the selected preset.
Relative time rangesWhen the window should be measured from the current timeEarliest time: 5 hours agoThe boundary moves as the current time changes when the search is run again.
Real-time rangesWhen monitoring events as they arriveA real-time windowThe search uses a moving window rather than a fixed historical window.
Date RangeWhen calendar dates are sufficientA start date and an end dateThe search uses a fixed period defined by calendar start and end dates.
Date & Time RangeWhen the investigation requires precise boundariesStart and end dates with exact timesThe search uses fixed start and end timestamps.

Preset time ranges

A preset time range is a predefined, commonly used search window. Open the time range picker next to the search bar and choose a preset that matches when the event or issue happened.

Yesterday

Choose Yesterday when the investigation concerns the previous calendar day. This is a calendar-based choice: it represents that day rather than an arbitrary 24-hour period ending now.

Last 24 hours

Choose Last 24 hours when you need the rolling 24-hour period immediately before the current time. It may include part of today and part of yesterday, so it is not necessarily the same period as Yesterday.

Relative time ranges

A relative time range expresses a boundary in relation to the current time. For example, an earliest boundary of 5 hours ago means that the search begins five hours before the current time.

Example: search the previous five hours

  1. Open the time range picker next to the search bar.
  2. Choose Relative.
  3. Set Earliest time to 5 hours ago.
  4. Run the search with the resulting relative window.

Earliest time is the beginning boundary of the selected search window. In this example, it limits the search to events from the previous five hours. Relative boundaries are useful when the required duration is not represented by a preset.

Time range type: Relative
Earliest time: 5 hours ago

Real-time ranges

Real-time ranges are available for searches that monitor events as time advances. Unlike a fixed historical window, a real-time search uses a moving time window. New events can enter the window while older events leave it as the window advances.

Use a real-time range for ongoing monitoring rather than for a fixed historical investigation with known start and end boundaries.

Custom date ranges

Date Range

Choose Date Range when only calendar dates are needed. Enter an explicit start date and end date to define a fixed search period. This is appropriate when an incident is known to have occurred during particular days but the exact times are not important.

Date & Time Range

Choose Date & Time Range when the investigation needs more precise boundaries. Enter the exact start date and time and the exact end date and time. This is useful when an incident interval is known, such as a service problem from 14:10 to 14:35 on a particular date.

Choosing the appropriate range

Base the choice on the approximate occurrence time of the issue:

NeedRecommended choiceExample
Previous calendar dayYesterdayInvestigating an issue believed to have happened yesterday
Previous rolling 24 hoursLast 24 hoursReviewing events from the preceding day, measured backward from now
Previous five hoursRelativeSet Earliest time to 5 hours ago
Exact known incident intervalDate & Time RangeEnter the exact start and end timestamps

Use a preset when a standard window fits the investigation. Use a relative range when the needed duration is measured backward or forward from the current time. Use Date Range or Date & Time Range when the incident boundaries are known and should remain fixed. If none of the presets matches the incident window, choose a custom or relative range.

Troubleshooting time-window problems

A search returns too many events

The search may be using All time or another overly broad range. Select a narrower preset, a relative range, or a custom date and time window based on when the issue occurred.

Expected events are missing

The selected boundaries may not include the event occurrence time. Expand the range or select a range that matches the approximate or exact incident period. Also verify whether the event occurred near the beginning or end boundary.

Yesterday and Last 24 hours return different results

These options describe different windows. Yesterday refers to the previous calendar day, while Last 24 hours refers to a rolling duration ending at the current time. Choose the option that matches the intended investigation window.

Key points

  • The time range picker is next to the search bar and controls the time boundaries for a search.
  • All time is the default and searches all available indexed time.
  • Presets such as Yesterday and Last 24 hours provide ready-made windows.
  • Relative ranges express boundaries such as 5 hours ago in relation to the current time.
  • Real-time ranges use a moving window for monitoring.
  • Date Range uses fixed calendar dates; Date & Time Range uses exact dates and times.
  • Choose a range that includes the likely incident period without searching unnecessarily broad time.

For related practice, see the Splunk time range picker guide.