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!

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...

Auto-Injector for Everything Else: Making OpenTelemetry Truly Universal

You might have seen Splunk’s recent announcement about donating the OpenTelemetry Injector to the ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...