Splunk Enterprise

Change time format for a workflow action?

alferone
Explorer

Here is a snippet of the URL I am sending and the time format in which it needs to be:

startTime=2023-12-01T16%3A27%3A45.000Z&endTime=2023-12-01T16%3A32%3A45.000Z

However, when I try to send "latesttime" or "earliesttime", splunk is sending it in epoch.

How do I get the proper format of time for the URL within the workflow action?

Thanks!

Labels (1)
0 Karma

glc_slash_it
Path Finder

Hi,

For Splunk, earliest and latest fields are always in epoch format.

But you can try to format them using strptime(earliest , "%Y-%m-%dT%H:%M:%S").

Docs:

https://docs.splunk.com/Documentation/SCS/current/SearchReference/DateandTimeFunctions#strptime.28.2...

 

------------
If this was helpful, some karma would be appreciated.

 

0 Karma

alferone
Explorer

Well, yeah, I understand how I can convert the time from epoch, but I am trying to do this inside of a workflow action.  Someone searches "index=firewall", and then they click on "Event Actions" to click on the workflow action.  How does the time get converted through that mechanism?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...