# Date format issue when reading data from ElasticSearch

**URL:** <https://discuss.elastic.co/t/date-format-issue-when-reading-data-from-elasticsearch/236739>\
**Category:** Elasticsearch\
**Created:** [June 11, 2020, 3:54pm UTC](https://discuss.elastic.co/t/date-format-issue-when-reading-data-from-elasticsearch/236739 "2020-06-11T15:54:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![samargh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samargh/32/70171_2.png) [@samargh](https://discuss.elastic.co/u/samargh)\
**Post date:** [June 11, 2020, 3:54pm UTC](https://discuss.elastic.co/t/date-format-issue-when-reading-data-from-elasticsearch/236739/1 "2020-06-11T15:54:01Z")

</div>

i'm reading data from elasticsearch . when i visualize date format on kibana it shows  
Date Aug 5, 2020 @ 23:00:00.000 =\> so it's correct  
but when i'm reading it from elasticsearch to do some machine learning ,  
i noticed that date format is taken wrong  
Date 1.596665e+12

i'm collecting the content of the index into a dataframe with pyspark and i can do it in scala if there's any solution  
"  
from elasticsearch import Elasticsearch  
from pandasticsearch import Select

# Connection to ElasticSearch

es = Elasticsearch(['[http://localhost:9200](http://localhost:9200)'],timeout=600)  
documents = es.search(index='sub1',body={})

# Convert the result to Pandas Dataframe

pandas\_df = Select.from\_dict(documents).to\_pandas()  
print(pandas\_df)  
"  
it shows wrong date format , so how can i solve it ? any help ?  
thank u

---

<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 9, 2020, 3:54pm UTC](https://discuss.elastic.co/t/date-format-issue-when-reading-data-from-elasticsearch/236739/2 "2020-07-09T15:54:02Z")

</div>

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