# How to take EPOCH time as @timestamp

**URL:** https://discuss.elastic.co/t/how-to-take-epoch-time-as-timestamp/32673
**Category:** Logstash
**Created:** [October 21, 2015, 12:53pm UTC](https://discuss.elastic.co/t/how-to-take-epoch-time-as-timestamp/32673 "2015-10-21T12:53:48Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)
#### Post date: [October 21, 2015, 12:53pm UTC](https://discuss.elastic.co/t/how-to-take-epoch-time-as-timestamp/32673/1 "2015-10-21T12:53:48Z")

</div>

Hi Experts,

I have a filed which has EPOCH time in it e.g "1443463933000". I want to use it as a @ timestamp filed in kibana . So this is what I have done .

**Step 1**  
--\> In logstash i used a date filter and set target to this filed i.e  
date {  
match =\> ["rt","UNIX"]  
target =\> "rt"  
}  
**Step 2**  
In mapping I set this field to date type i.e  
"mapping": {  
"rt": {  
"type": "date",  
"format": "dateOptionalTime"  
}  
}

**Step3**  
Now when I am selecting index based on this time in Kibana i got nothing , kibana says no result found .

Is there anything which I need to take care of ?

Thanks  
VG

---

<div class="post-metadata">

### Author: ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)
#### Post date: [October 21, 2015, 2:49pm UTC](https://discuss.elastic.co/t/how-to-take-epoch-time-as-timestamp/32673/2 "2015-10-21T14:49:24Z")

</div>

Any Suggestion please ?

---

<div class="post-metadata">

### Author: ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)
#### Post date: [October 21, 2015, 3:14pm UTC](https://discuss.elastic.co/t/how-to-take-epoch-time-as-timestamp/32673/3 "2015-10-21T15:14:19Z")

</div>

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

---

<div class="post-metadata">

### Author: ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)
#### Post date: [October 21, 2015, 3:29pm UTC](https://discuss.elastic.co/t/how-to-take-epoch-time-as-timestamp/32673/4 "2015-10-21T15:29:51Z")

</div>

It looks like you should be using [UNIX\_MS](https://www.elastic.co/guide/en/logstash/current/plugins-filters-date.html#plugins-filters-date-match) in your match statement as your number appears to be epoch plus milliseconds.

---

<div class="post-metadata">

### Author: ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)
#### Post date: [October 21, 2015, 3:31pm UTC](https://discuss.elastic.co/t/how-to-take-epoch-time-as-timestamp/32673/5 "2015-10-21T15:31:03Z")

</div>

Thank You Aaron, It works for me, but I am getting kind of warnings in LS console

 ![](https://us1.discourse-cdn.com/elastic/original/2X/b/b178eddc9796f92c990b1137f27a529f31e41464.png)

---

<div class="post-metadata">

### Author: ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)
#### Post date: [October 21, 2015, 3:46pm UTC](https://discuss.elastic.co/t/how-to-take-epoch-time-as-timestamp/32673/6 "2015-10-21T15:46:36Z")

</div>

That's a completely different topic, there. From what I can see, it appears that non-UTF8 data is being sent. You may need to fix your input to coerce a type, or something. Again, please ask that in a different topic as it's no longer relevant to this one.

---

<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: [July 6, 2017, 5:25am UTC](https://discuss.elastic.co/t/how-to-take-epoch-time-as-timestamp/32673/7 "2017-07-06T05:25:53Z")

</div>


