# Logstash convert existing timestamp format in message

**URL:** https://discuss.elastic.co/t/logstash-convert-existing-timestamp-format-in-message/321309
**Category:** Logstash
**Created:** [December 15, 2022, 1:10pm UTC](https://discuss.elastic.co/t/logstash-convert-existing-timestamp-format-in-message/321309 "2022-12-15T13:10:09Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Groove](https://avatars.discourse-cdn.com/v4/letter/g/4af34b/32.png) [@Groove](https://discuss.elastic.co/u/Groove)
#### Post date: [December 15, 2022, 1:10pm UTC](https://discuss.elastic.co/t/logstash-convert-existing-timestamp-format-in-message/321309/1 "2022-12-15T13:10:09Z")

</div>

Hello,

I have 2 different application logs.

OUTPUT:

```auto
<135>1 2022-12-12T16:28:02Z HOSTNAME EvntSLog - - - Le service Service de licences de client (ClipSVC) est entré dans l’état : arrêté.

<134>Dec 12 16:28:02 HOSTNAME CEF:0|Trend Micro|Deep Security Manager|20.0.703|602|User Timed Out|

```

Here, both timestamp is different and I want to convert both timestamp format to standard timestamp format which would be "dd-mm-yyyy-HH-MM-SS".

My filter setting is

```auto
grok {
      match => { "message" => "%{TIMESTAMP_ISO8601:timestamp}" }
    }
    date {
        match => ["timestamp", "yyyy-mm-dd HH:mm:ss,SSS", "yyyy-mm-dd HH:mm:ss a"]
    }

```

Thanks in advance.

---

<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: [January 12, 2023, 1:11pm UTC](https://discuss.elastic.co/t/logstash-convert-existing-timestamp-format-in-message/321309/2 "2023-01-12T13:11:08Z")

</div>

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