Try a sample question
This is an original sample question written by itmoshi based on the exam objectives.
It is now 14:37 on December 1, 2026. Without using the time range picker, you want the search string itself to return only events from the whole previous day: from November 30 00:00:00 (inclusive) up to December 1 00:00:00 (exclusive). Which time modifiers should follow index=web?
- Aearliest=-1d latest=now
- Bearliest=-1d@d latest=@d
- Cearliest=@d latest=now
- Dearliest=-24h@h latest=@h
Show answer and explanation
Answer:B -1d@d (go back one day, then snap to the start of that day) combined with @d (snap to midnight today) is correct.
Why it is correct
The unit after @ snaps the time down to the start of that unit. -1d@d first goes back one day to November 30 14:37, then snaps to the start of that day, giving November 30 00:00:00. latest=@d is today at 00:00:00, and latest is exclusive, so the range covers exactly the previous calendar day.
The other options
- ✗ A With no snapping, this is November 30 14:37 until now, i.e. from the same time one day earlier until now. Use it when you want a rolling window regardless of day boundaries.
- ✗ C This is today from 00:00 until now: today so far, not yesterday. Use it to see a partial total for the current day.
- ✗ D Snapping to the hour gives November 30 14:00 to December 1 14:00, which does not line up with day boundaries. Use it when you want the last 24 hours aligned to whole hours.
Key takeaway
When @ follows an offset, as in -1d@d, the offset is applied first and then the snap. -1d → same time one day earlier; -1d@d → midnight yesterday; @d → midnight today; -24h@h → 24 hours ago, aligned to the hour. For exactly 24 elapsed hours use -24h rather than -1d (they can differ on daylight-saving changeover days). The latest time itself is excluded.
Try 21 questions like this for free
itmoshi is an unofficial study service and is not affiliated with Splunk or any exam provider.