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!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...