Splunk Search

How to specify earliest and latest time modifiers to display previous week and current week results?

sxp5686
Explorer

Hi,
We are having option of previous week and current week in time modifier in search.Can anyone tell how I will get the equivalent code, in terms of earliest and latest.

Tags (1)
0 Karma
1 Solution

mayurr98
Super Champion

hey
for previous week:

earliest=-7d@w0 latest=@w0

for current week:

earliest=@w0 latest=now

let me know if this helps you!

View solution in original post

mayurr98
Super Champion

hey
for previous week:

earliest=-7d@w0 latest=@w0

for current week:

earliest=@w0 latest=now

let me know if this helps you!

sxp5686
Explorer

We can try this also.

For earliest :
earliest=-1w@w latest=@w

For latest:
earliest=@w latest=now

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...