# How to convert String timestamp to actual timestamp?

**URL:** <https://discuss.elastic.co/t/how-to-convert-string-timestamp-to-actual-timestamp/39926>\
**Category:** Logstash\
**Created:** [January 22, 2016, 10:31pm UTC](https://discuss.elastic.co/t/how-to-convert-string-timestamp-to-actual-timestamp/39926 "2016-01-22T22:31:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gaurav1424](https://avatars.discourse-cdn.com/v4/letter/g/97f17d/32.png) [@gaurav1424](https://discuss.elastic.co/u/gaurav1424)\
**Post date:** [January 22, 2016, 10:31pm UTC](https://discuss.elastic.co/t/how-to-convert-string-timestamp-to-actual-timestamp/39926/1 "2016-01-22T22:31:02Z")

</div>

Hello All,

I have such kind of syslog events :  
Jan 22 14:24:23 mike.local DDP\_Agent[83]: Complete - state change from encrypted\_state to encrypted\_state, commandState = encrypt\_commandedState

Once I parse using syslog , I get syslog\_timestamp as  
"syslog\_timestamp" =\> "Jan 22 14:11:23"

which is a string. How do I convert into timestamp so that I can put this into elastic search and have queries based on timestamp.

Thanks  
Gaurav

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 23, 2016, 4:35pm UTC](https://discuss.elastic.co/t/how-to-convert-string-timestamp-to-actual-timestamp/39926/2 "2016-01-23T16:35:11Z")

</div>

Please don't start many threads about the same problem. The answer is still that you should use the date filter, which you've successfully done.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 24, 2016, 3:44am UTC](https://discuss.elastic.co/t/how-to-convert-string-timestamp-to-actual-timestamp/39926/3 "2016-01-24T03:44:23Z")

</div>

See [Conver String to date (or replace @timestamp) (SOLVED)](https://discuss.elastic.co/t/conver-string-to-date-or-replace-timestamp-solved/32957/12)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 24, 2016, 3:44am UTC](https://discuss.elastic.co/t/how-to-convert-string-timestamp-to-actual-timestamp/39926/4 "2016-01-24T03:44:26Z")

</div>


