# Elasticsearch taking wrong date from my unix time value

**URL:** https://discuss.elastic.co/t/elasticsearch-taking-wrong-date-from-my-unix-time-value/119410
**Category:** Elasticsearch
**Created:** [February 12, 2018, 4:10am UTC](https://discuss.elastic.co/t/elasticsearch-taking-wrong-date-from-my-unix-time-value/119410 "2018-02-12T04:10:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![raja\_gopal](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@raja\_gopal](https://discuss.elastic.co/u/raja_gopal)
#### Post date: [February 12, 2018, 4:10am UTC](https://discuss.elastic.co/t/elasticsearch-taking-wrong-date-from-my-unix-time-value/119410/1 "2018-02-12T04:10:19Z")

</div>

Hi

I have created an index with date values in this below format

> "LastChangedAt" : {  
> "type" : "date",  
> "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||date\_time||epoch\_millis"  
> },

Now in logstash i just parsed the xml file using xml filter

> xml {  
> store\_xml =\> true  
> source =\> message  
> target =\> parsed\_message  
> force\_array =\> false  
> remove\_field =\> "message"  
> }  
> When i view the data in elasticsearch i see that the date value is just the epoch value in timestamp and it is converting the exact value. I even used the date filter to convert unix value to timestamp and checked but it failed

> date {  
> match =\> ["[parsed\_message][LastChangedAt]", "UNIX" ]  
> target =\> "LastChangedAt"  
> }

Is it a mistake in configuration, if so is there a possibility to recover ?

---

<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: [March 12, 2018, 4:19am UTC](https://discuss.elastic.co/t/elasticsearch-taking-wrong-date-from-my-unix-time-value/119410/2 "2018-03-12T04:19:07Z")

</div>

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