Splunk Search

Is there a function to get the week day from any given epoch time?

manus
Communicator

I know how to get the week day from raw events, the week day is stored in the field date_wday.
However, I wonder if there's a function to compute the week day from an epoch time, as I want to get it from a field on a table which doesn't come from a raw event _time.

Tags (4)
1 Solution

manus
Communicator

I once again replied to my own question... Maybe I shouldn't ask so quickly...

|eval date_wday=strftime(epochtime,"%w")

View solution in original post

aweitzman
Motivator

<search> | eval dayofweekshort=strftime(epochtime,"%a") | eval dayofweekfull=strftime(epochtime,"%A") | eval dayofweekasnumber=strftime(epochtime,"%w")

http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Commontimeformatvariables

manus
Communicator

I once again replied to my own question... Maybe I shouldn't ask so quickly...

|eval date_wday=strftime(epochtime,"%w")

Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...