# Logstash parsing date into JSON

**URL:** <https://discuss.elastic.co/t/logstash-parsing-date-into-json/160229>\
**Category:** Logstash\
**Created:** [December 10, 2018, 5:06pm UTC](https://discuss.elastic.co/t/logstash-parsing-date-into-json/160229 "2018-12-10T17:06:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frederic\_Gaerel](https://avatars.discourse-cdn.com/v4/letter/f/90ced4/32.png) [@Frederic\_Gaerel](https://discuss.elastic.co/u/Frederic_Gaerel)\
**Post date:** [December 10, 2018, 5:06pm UTC](https://discuss.elastic.co/t/logstash-parsing-date-into-json/160229/1 "2018-12-10T17:06:09Z")

</div>

Hi. this problem seems solved for some but I still have it....

Sample data in log file :  
{"TIMESTAMP":"2018-12-10 11:28:20.753","USER":"username (AIX)","ACTION":"SEARCH\_SITE","CALLING\_METHOD":"postRechercheSites","FILTRE":"{organisation=ALL, code\_depot=, code\_tracking=, activite\_rattachement=ALL, code\_activite=AGE, trigramme=, statut=ACT, code\_postal=, critere\_date=ALL, date=}"}

My conf file :  
input {  
file {  
path =\> "/etc/logstash/log/Ref_Technical_.log"  
start\_position =\> "beginning"  
}  
}

filter {  
json {  
source =\> "message"  
}  
date {  
match =\> ["[message][TIMESTAMP]" , "yyyy-MM-dd HH:mm:ss.SSS" ]  
}  
date {  
match =\> ["TIMESTAMP" , "yyyy-MM-dd HH:mm:ss.SSS"]  
target =\> "MY\_TIMESTAMP2"  
}  
}

output {  
elasticsearch {  
hosts =\> ["elasticsearch:9200"]  
index =\> "myindexname"  
}  
stdout {  
codec =\> rubydebug  
}  
}

my problem 😄  
TIMESTAMP inside JSON is still TEXT and never converted to date...

thanks for help...

---

<div class="post-metadata">

**Author:** ![Frederic\_Gaerel](https://avatars.discourse-cdn.com/v4/letter/f/90ced4/32.png) [@Frederic\_Gaerel](https://discuss.elastic.co/u/Frederic_Gaerel)\
**Post date:** [December 11, 2018, 11:05am UTC](https://discuss.elastic.co/t/logstash-parsing-date-into-json/160229/2 "2018-12-11T11:05:21Z")

</div>

Auto closed.  
PEBKAC...

---

<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:** [January 8, 2019, 11:05am UTC](https://discuss.elastic.co/t/logstash-parsing-date-into-json/160229/3 "2019-01-08T11:05:22Z")

</div>

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