# DayOfWeek from log timestamp using logstash

**URL:** <https://discuss.elastic.co/t/dayofweek-from-log-timestamp-using-logstash/93198>\
**Category:** Logstash\
**Created:** [July 14, 2017, 1:32pm UTC](https://discuss.elastic.co/t/dayofweek-from-log-timestamp-using-logstash/93198 "2017-07-14T13:32:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anisen](https://avatars.discourse-cdn.com/v4/letter/a/5fc32e/32.png) [@anisen](https://discuss.elastic.co/u/anisen)\
**Post date:** [July 14, 2017, 1:32pm UTC](https://discuss.elastic.co/t/dayofweek-from-log-timestamp-using-logstash/93198/1 "2017-07-14T13:32:57Z")

</div>

Hi,

My log looks like this:  
66.221.154.0 - - [05/Feb/2014:17:11:55 +0530] "GET /mySite/HomePage.asmx HTTP/1.1" 200 110 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.5 Safari/535.19"

I am trying to extract the 'dayOfWeek' information for each log event with the below filters but no success.

date {  
match =\> ["timestamp", "dd/MMM/YYYY:HH:mm:ss +0530"]  
}  
ruby {  
code =\> "event.set('dayOfWeek',event.get('timestamp').strftime(%a))"  
}

Please suggest.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 11, 2017, 1:33pm UTC](https://discuss.elastic.co/t/dayofweek-from-log-timestamp-using-logstash/93198/2 "2017-08-11T13:33:03Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
