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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...