Splunk Search

Search since beginning of yesterday

Path Finder


If now, it is 30/12/2021 22:30, how can I search for timestamps from 29/12/2021 00:00:00 (i.e. beginning of 29/12/2021 or dynamically 'beginning of yesterday')?

I need this in a search code rather than the GUI presets etc.


Labels (1)
0 Karma


@SplnkUse Please add the below earliest and lastest in your query after your index and sourcetype, example:

index=<<your_indexname>> sourcetype=<<your_sourcetypename>> earliest=-1d@d latest=now

Also if this reply helped you in solving your problem an up-vote would be appreciated.




Try earliest=-1d@d

See https://docs.splunk.com/Documentation/Splunk/8.2.4/SearchReference/SearchTimeModifiers for details.

If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...