# Convert String to Date field within Kibana

**URL:** <https://discuss.elastic.co/t/convert-string-to-date-field-within-kibana/94518>\
**Category:** Kibana\
**Created:** [July 25, 2017, 5:03pm UTC](https://discuss.elastic.co/t/convert-string-to-date-field-within-kibana/94518 "2017-07-25T17:03:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![brhawtho](https://avatars.discourse-cdn.com/v4/letter/b/da6949/32.png) [@brhawtho](https://discuss.elastic.co/u/brhawtho)\
**Post date:** [July 25, 2017, 5:03pm UTC](https://discuss.elastic.co/t/convert-string-to-date-field-within-kibana/94518/1 "2017-07-25T17:03:05Z")

</div>

Hey all,

I'm looking to add a new date field to sort by within Kibana. Currently, messages are sorted based on the default @timestamp, but I would like to be able to sort on an additional field. The date I am passing in is currently matched to the SYSLOGTIMESTAMP grok filter into a field. That field is currently represented as a string. Does it have to be specially formatted to be converted to a date field from within Kibana?

Thanks!

---

<div class="post-metadata">

**Author:** ![brhawtho](https://avatars.discourse-cdn.com/v4/letter/b/da6949/32.png) [@brhawtho](https://discuss.elastic.co/u/brhawtho)\
**Post date:** [July 25, 2017, 6:05pm UTC](https://discuss.elastic.co/t/convert-string-to-date-field-within-kibana/94518/2 "2017-07-25T18:05:24Z")

</div>

Upon further research, it looks like I can use the date filter:  
[Converting string to date](https://discuss.elastic.co/t/converting-string-to-date/26748/2)

So, I would like additional support if possible. My date would currently be formatted as MMM dd HH:mm:ss, will this field now be converted _without replacing the @timestamp field_ if I do the following?  
date { match =\> ["field\_name", "MMM dd HH:mm:ss"] }

Of course assuming the grok{} filter correctly parses the messages into their respective fields, would this work?

---

<div class="post-metadata">

**Author:** ![jbudz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbudz/32/45922_2.png) [@jbudz](https://discuss.elastic.co/u/jbudz)\
**Post date:** [July 26, 2017, 11:39am UTC](https://discuss.elastic.co/t/convert-string-to-date-field-within-kibana/94518/3 "2017-07-26T11:39:40Z")

</div>

If you use the date filter with default configs it will replace the @timestamp field. You can change the target field however, [https://www.elastic.co/guide/en/logstash/current/plugins-filters-date.html#plugins-filters-date-target](https://www.elastic.co/guide/en/logstash/current/plugins-filters-date.html#plugins-filters-date-target).

---

<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:** [August 23, 2017, 11:39am UTC](https://discuss.elastic.co/t/convert-string-to-date-field-within-kibana/94518/4 "2017-08-23T11:39:53Z")

</div>

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