# How to convert one filed date to string in Logstash

**URL:** <https://discuss.elastic.co/t/how-to-convert-one-filed-date-to-string-in-logstash/328075>\
**Category:** Logstash\
**Created:** [March 20, 2023, 12:47pm UTC](https://discuss.elastic.co/t/how-to-convert-one-filed-date-to-string-in-logstash/328075 "2023-03-20T12:47:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![upreddy](https://avatars.discourse-cdn.com/v4/letter/u/f04885/32.png) [@upreddy](https://discuss.elastic.co/u/upreddy)\
**Post date:** [March 20, 2023, 12:47pm UTC](https://discuss.elastic.co/t/how-to-convert-one-filed-date-to-string-in-logstash/328075/1 "2023-03-20T12:47:06Z")

</div>

Hi,  
I have below log pattern,  
2023-03-15T11:11:59.341602012Z stdout F [INFO] {"logtype":"msg","trackingid":"XXXXXXX","abcid":"XXXXXXX","operation":{"name":"XXXXX","version":"105"}  
,"usecase":"ABC","runtimes":{"output":XXX,"storeput":-1},"destination":"Inject","status":201, **"message":"OK:instancedate:2023-02-21T11:11:59.045+0000**"}

In above logpattern **"message":"OK:instancedate:2023-02-21T11:11:59.045+0000"**  
is changed into **"message":"2023-03-13T07:25:00.310+0000"** remaining thing is same . Now we are getting "message" field is conflict in kibana.

We have "string" value for "message" field for other "usecases". Currently we have  
**1. "usecase" = ABC "message" filed is "2023-03-13T07:25:00.310+0000"**  
**2. "usecase" = XYZ or PQR "message" filed is "heloo world"**.  
my requirement is i need to store **"message"** filed in **all "usecase"** how can i achieve this?

---

<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:** [April 17, 2023, 12:47pm UTC](https://discuss.elastic.co/t/how-to-convert-one-filed-date-to-string-in-logstash/328075/2 "2023-04-17T12:47:16Z")

</div>

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