Splunk Search

How to find events between date ranges

riveraj1
Observer

I am trying to find the events that are taking place between March 1 2021 and September 1 2021. I was hoping someone could tell me where I am going wrong in my search.

| eval timestampDate=strptime(ScheduledStartDate, "%m/%d/%Y")
| eval project_start=strptime("03/01/2021", "%m/%d/%Y")
| eval project_end=strptime("09/01/2021", "%m/%d/%Y")
| eval formattedTimestamp = strftime(timestamp, "%Y-%m-%d")
| where timestampDate >= project_start AND timestampDate <= project_end
| table Country timestampDate

Labels (1)
0 Karma

scelikok
SplunkTrust
SplunkTrust

Hi @riveraj1,

Assuming the time range covers the required events, everything seems fine, maybe there is a simple typo. Can you please share a few sample events?

If this reply helps you an upvote and "Accept as Solution" is appreciated.
0 Karma
Get Updates on the Splunk Community!

Index This | What did the zero say to the eight?

June 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

Splunk Observability Cloud's AI Assistant in Action Series: Onboarding New Hires & ...

This is the fifth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Now Playing: Splunk Education Summer Learning Premieres

It’s premiere season, and Splunk Education is rolling out new releases you won’t want to miss. Whether you’re ...