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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...