Splunk Search

Eval strptime not creating new field

svercelli
Path Finder

I'm trying to create a calculation based on subtracting 2 dates so I'm trying to create a new eval field that converts the date into epoch time.

eval testing= strptime(PublicScheduledDateTime, "%d/%m/%Y %H/%M")

is what i have for the statement, and the time itself is in the format

07/05/2016 23:50

However when I run the search I don't get any errors and I know the fields have values yet no evaluated field called testing is created.

0 Karma
1 Solution

sundareshr
Legend

Try this (your time format had a / instead of 🙂

eval testing= strptime(PublicScheduledDateTime, "%d/%m/%Y %H:%M")

View solution in original post

sundareshr
Legend

Try this (your time format had a / instead of 🙂

eval testing= strptime(PublicScheduledDateTime, "%d/%m/%Y %H:%M")

svercelli
Path Finder

XP, Typos will be the death of me...

0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...