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!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...