# Logstash date to datetime format

**URL:** <https://discuss.elastic.co/t/logstash-date-to-datetime-format/221446>\
**Category:** Logstash\
**Created:** [February 28, 2020, 2:07pm UTC](https://discuss.elastic.co/t/logstash-date-to-datetime-format/221446 "2020-02-28T14:07:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 28, 2020, 5:37pm UTC](https://discuss.elastic.co/t/logstash-date-to-datetime-format/221446/2 "2020-02-28T17:37:28Z")

</div>

If date is already a LogStash::Timestamp you can [use ruby and strftime](https://discuss.elastic.co/t/date-field-being-converted-to-timestamps/180044/4) to format it as any string format you like.

---

_[View the full topic](https://discuss.elastic.co/t/logstash-date-to-datetime-format/221446)._
