# Date format problem with Kibana ingestion

**URL:** https://discuss.elastic.co/t/date-format-problem-with-kibana-ingestion/333357
**Category:** Kibana
**Created:** [May 13, 2023, 5:08pm UTC](https://discuss.elastic.co/t/date-format-problem-with-kibana-ingestion/333357 "2023-05-13T17:08:58Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Phildefer](https://avatars.discourse-cdn.com/v4/letter/p/9fc348/32.png) [@Phildefer](https://discuss.elastic.co/u/Phildefer)
#### Post date: [May 13, 2023, 5:08pm UTC](https://discuss.elastic.co/t/date-format-problem-with-kibana-ingestion/333357/1 "2023-05-13T17:08:58Z")

</div>

Hi,

I have a CSV file with a field date 5in french) like this : samedi 13 mai 2023 and I don't find any ISO format in Kibana to make this field recognizable as a date field during the ingestion.  
If you have a solution ... Thx

---

<div class="post-metadata">

### Author: ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)
#### Post date: [May 29, 2023, 3:41pm UTC](https://discuss.elastic.co/t/date-format-problem-with-kibana-ingestion/333357/2 "2023-05-29T15:41:07Z")

</div>

You just need to set up the locale on your mapping and it should be OK to ingest.

This test worked for me, setting an index mapping that accepts both a date with your example definition and the standard `YYYY-MM-dd` format. Then inserted a couple docs and finally run a query to ensure that the document was correctly indexed.

```auto
DELETE discuss-333357

# Set up a date with locale in French
PUT discuss-333357
{
  "mappings": {
    "properties": {
      "my_date": {
        "type": "date",
        "locale": "fr",
        "format": "EEEE dd MMMM yyyy||strict_date_optional_time"
      }
    }
  }
}

# Add some data
POST discuss-333357/_bulk
{ "index": {}}
{"my_date": "2023-05-29"}
{ "index": {}}
{ "my_date": "samedi 13 mai 2023"}

# Check data is processed correctly
GET discuss-333357/_search
{
  "query": {
    "range": {
      "my_date": {
        "lte": "2023-05-20"
      }
    }
  }
}

```

Where the last search just returns the document with the date inselted in French:

```auto
{
  "took": 0,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 1,
      "relation": "eq"
    },
    "max_score": 1,
    "hits": [
      {
        "_index": "discuss-333357",
        "_id": "AsgoaIgB_eeZxg5A8LWK",
        "_score": 1,
        "_source": {
          "my_date": "samedi 13 mai 2023"
        }
      }
    ]
  }
}

```

Hope it helps!

---

<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: [June 26, 2023, 3:41pm UTC](https://discuss.elastic.co/t/date-format-problem-with-kibana-ingestion/333357/3 "2023-06-26T15:41:10Z")

</div>

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