Splunk Search

Contact strptime date conversion

jcisha
Path Finder

is converted to,2013-03-1 strftime (_time, "%Y-%m-%W").
However, the
and strptime (strftime (_time, "%Y-%m-%W"), "%Y-%m-%W"), not converted.

I want to know how to solve.

Tags (1)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

In case you're trying to "round down" a timestamp to the start of the week you should do this instead:

eval my_time = relative_time(_time, "@w1")

If you consider Sunday to be the start of the week you can use @w or @w0.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...