# Issue with ISO8601 date stored as string in my index

**URL:** https://discuss.elastic.co/t/issue-with-iso8601-date-stored-as-string-in-my-index/365767
**Category:** Elastic Search
**Created:** [August 29, 2024, 11:52am UTC](https://discuss.elastic.co/t/issue-with-iso8601-date-stored-as-string-in-my-index/365767 "2024-08-29T11:52:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![efazenda](https://avatars.discourse-cdn.com/v4/letter/e/5e9695/32.png) [@efazenda](https://discuss.elastic.co/u/efazenda)
#### Post date: [August 29, 2024, 11:52am UTC](https://discuss.elastic.co/t/issue-with-iso8601-date-stored-as-string-in-my-index/365767/1 "2024-08-29T11:52:54Z")

</div>

Dear Community,

I have a Custom Log integration active on my ELK Stack which get a file located in a specific path of my server where Elastic Agent is installed.

Here an example of the source of data :

```auto
08DCC572EA626F63 2024-08-29T08:06:57.359Z 2024-08-29T08:06:57.361Z 1.1.1.1 25 0 1.1.1.1:62748 127.0.0.1 empty 1 SERVER Default Frontend SERVER 
08DCC572EA626F64 2024-08-29T08:07:04.343Z 2024-08-29T08:07:04.344Z 1.1.1.1 587 0 1.1.1.1:62894 127.0.0.1 empty 1 SERVER Client Frontend SERVER

```

Here the processors of my custom pipeline for this datastream

```auto
[
  {
    "grok": {
      "field": "message",
      "patterns": [
        "%{WORD:Transaction} %{TIMESTAMP_ISO8601:Start_Transaction} %{TIMESTAMP_ISO8601:End_Transaction} %{IP:ServerIP} %{INT:ServerPort} %{INT:LoginState} %{HOSTPORT:ProxyServer} %{IP:RemoteIP} %{HTTPDUSER:UserName} %{INT:State} %{HOSTNAME:ServerName} %{GREEDYDATA:Connector}"
      ]
    }
  },
  {
    "set": {
      "field": "Exchange.Protocol",
      "value": "SMTP"
    }
  }
]

```

Unfortunately the fields Start\_Transaction and End\_Transaction are stored as string and not date.

If i am not wrong ISO8601 is understood as a format for a date type , why my fields are converted as strings ?

My Stack ELK is at the version 8.15.

Best Regards, Edouard Fazenda.

---

<div class="post-metadata">

### Author: ![efazenda](https://avatars.discourse-cdn.com/v4/letter/e/5e9695/32.png) [@efazenda](https://discuss.elastic.co/u/efazenda)
#### Post date: [August 29, 2024, 2:15pm UTC](https://discuss.elastic.co/t/issue-with-iso8601-date-stored-as-string-in-my-index/365767/2 "2024-08-29T14:15:58Z")

</div>

I have found the solution :

The use of **strict\_date\_time** built in formater.

[format | Elasticsearch Guide [8.15] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.15/mapping-date-format.html)

---

<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: [September 26, 2024, 2:16pm UTC](https://discuss.elastic.co/t/issue-with-iso8601-date-stored-as-string-in-my-index/365767/3 "2024-09-26T14:16:22Z")

</div>

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