# Converting date to TIMESTAMP\_ISO8601 format

**URL:** <https://discuss.elastic.co/t/converting-date-to-timestamp-iso8601-format/262952>\
**Category:** Logstash\
**Created:** [February 2, 2021, 9:37am UTC](https://discuss.elastic.co/t/converting-date-to-timestamp-iso8601-format/262952 "2021-02-02T09:37:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gloupe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gloupe/32/49777_2.png) [@gloupe](https://discuss.elastic.co/u/gloupe)\
**Post date:** [February 2, 2021, 9:37am UTC](https://discuss.elastic.co/t/converting-date-to-timestamp-iso8601-format/262952/1 "2021-02-02T09:37:22Z")

</div>

Hi,

I'm actually receiving logs with timestamp to this format :  
**Mon Feb 1 13:29:48 2021**

From Telegraf who's parsing the log with this Grok pattern :

SOURCELOG **%{DAY} %{MONTH} (?: %{POSINT:MONTHDAY}) %{TIME} %{YEAR}** -\> %{GREEDYDATA:data}

I want logstash to change the format to the TIMESTAMP\_ISO8601 format known as:

%{YEAR}-%{MONTHNUM}-%{MONTHDAY}[T]%{HOUR}:?%{MINUTE}(?::?%{SECOND})?%{ISO8601\_TIMEZONE}

I know the timezone info is missing but i want to add a constant value of it.

So my questions are how could I change this format and how could I add this fixed timezone ?

Thanks for your answers

---

<div class="post-metadata">

**Author:** ![tatdat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tatdat/32/113160_2.png) [@tatdat](https://discuss.elastic.co/u/tatdat)\
**Post date:** [February 2, 2021, 3:24pm UTC](https://discuss.elastic.co/t/converting-date-to-timestamp-iso8601-format/262952/2 "2021-02-02T15:24:56Z")

</div>

You can try with date filter plugin. I think your problem can be resolved.

[https://www.elastic.co/guide/en/logstash/current/plugins-filters-date.html#plugins-filters-date-match](https://www.elastic.co/guide/en/logstash/current/plugins-filters-date.html#plugins-filters-date-match)

---

<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:** [March 2, 2021, 3:25pm UTC](https://discuss.elastic.co/t/converting-date-to-timestamp-iso8601-format/262952/3 "2021-03-02T15:25:10Z")

</div>

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