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!

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 ...