Splunk Search

How to convert date time to epoc time.

drogo
Explorer

Team, wanted to convert below time into epoc time. Please help.
time - Nov 16 10:00:57 2024


Labels (1)
0 Karma

sintjm
Path Finder

hi,
try

| makeresults
| eval date="Nov 16 10:00:57 2024"
| eval epoch_time=strptime(date, "%b %d %H:%M:%S %Y")
| fields epoch_time

regards,

Abraham

drogo
Explorer

Thanks Abraham, this helped.

0 Karma

sintjm
Path Finder

Don't mention

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