# Convert date to string

**URL:** <https://discuss.elastic.co/t/convert-date-to-string/223232>\
**Category:** Logstash\
**Created:** [March 12, 2020, 1:19am UTC](https://discuss.elastic.co/t/convert-date-to-string/223232 "2020-03-12T01:19:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hyhong](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@hyhong](https://discuss.elastic.co/u/hyhong)\
**Post date:** [March 12, 2020, 1:19am UTC](https://discuss.elastic.co/t/convert-date-to-string/223232/1 "2020-03-12T01:19:40Z")

</div>

Logstah version:7.4.0  
When I used the follow command,it doesn't word:  
mutate{  
convert =\> {  
"depDate"=\>"string"  
}  
}  
The depDate formate is '2020-03-12' or '-' or '2020-03-12/2020-03-18'

---

<div class="post-metadata">

**Author:** ![ITIC](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@ITIC](https://discuss.elastic.co/u/ITIC)\
**Post date:** [March 12, 2020, 8:31am UTC](https://discuss.elastic.co/t/convert-date-to-string/223232/2 "2020-03-12T08:31:01Z")

</div>

Hi

What do you mean when you say that it does not work? Please post the output from `stdout{}` output plugin.

Proper formatting makes everybody's life easier. Please use the "\</\>" tool when posting code, samples, etc.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![Fabio-sama](https://avatars.discourse-cdn.com/v4/letter/f/b9e5f3/32.png) [@Fabio-sama](https://discuss.elastic.co/u/Fabio-sama)\
**Post date:** [March 12, 2020, 3:20pm UTC](https://discuss.elastic.co/t/convert-date-to-string/223232/3 "2020-03-12T15:20:23Z")

</div>

Ahahahah you might as well have written "my pc doesn't turn on. What's happened?".

Context guys, context...

---

<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 9, 2020, 3:20pm UTC](https://discuss.elastic.co/t/convert-date-to-string/223232/4 "2020-04-09T15:20:32Z")

</div>

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