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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...

Customer success is front and center at .conf25

Hi Splunkers, If you are not able to be at .conf25 in person, you can still learn about all the latest news ...