# Date format Feb 21, 2020 7:52:15 PM, in logstash

**URL:** <https://discuss.elastic.co/t/date-format-feb-21-2020-715-pm-in-logstash/222945>\
**Category:** Logstash\
**Created:** [March 10, 2020, 1:45pm UTC](https://discuss.elastic.co/t/date-format-feb-21-2020-715-pm-in-logstash/222945 "2020-03-10T13:45:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pink11](https://avatars.discourse-cdn.com/v4/letter/p/aca169/32.png) [@Pink11](https://discuss.elastic.co/u/Pink11)\
**Post date:** [March 10, 2020, 1:45pm UTC](https://discuss.elastic.co/t/date-format-feb-21-2020-715-pm-in-logstash/222945/1 "2020-03-10T13:45:47Z")

</div>

want to format date in "Feb 21, 2020 7:52:15 PM", format

What I have "zonedTime": "2020-02-21T19:52:15.001Z", and UNIX epoch as input

---

<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:** [March 10, 2020, 2:46pm UTC](https://discuss.elastic.co/t/date-format-feb-21-2020-715-pm-in-logstash/222945/2 "2020-03-10T14:46:47Z")

</div>

Does [this](https://discuss.elastic.co/t/date-change-day-and-month-position/221606/2) anwer your question?

---

<div class="post-metadata">

**Author:** ![Pink11](https://avatars.discourse-cdn.com/v4/letter/p/aca169/32.png) [@Pink11](https://discuss.elastic.co/u/Pink11)\
**Post date:** [March 10, 2020, 8:15pm UTC](https://discuss.elastic.co/t/date-format-feb-21-2020-715-pm-in-logstash/222945/3 "2020-03-10T20:15:15Z")

</div>

Yes.. that helped ... Thanks.... 😀

ruby {  
code =\> '  
t = event.get("starttime")  
event.set("timestamp", Time.at(t.to\_f).strftime("%b %d, %Y %H:%M:%S %p"))  
'  
}

---

<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 7, 2020, 8:15pm UTC](https://discuss.elastic.co/t/date-format-feb-21-2020-715-pm-in-logstash/222945/4 "2020-04-07T20:15:34Z")

</div>

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