Date formatting for import

I have a date field that is in the following format:

When I map the field to dd-MMM-yy it won't accept the date above but it will accept the following:

Is there a way to get Elasticsearch to accept the former?

PUT tctestindex
  "mappings": {
    "properties": {
      "date": {
        "type": "date", 
        "format": "d-MMM-yy"

# works!
PUT tctestindex/_doc/1
{ "date": "01-Jan-20" }

PUT tctestindex/_doc/2
{ "date": "01-JAN-20" }


I do not think is possible, after a quick scan of (you may want to take a look yourself).

You could maybe convert this using a script processor and some text wranling.


@spinscale - thanks for the response. I did see that link and saw this line:
M/L month-of-year number/text 7; 07; Jul; July; J

I just thought I might be missing something; specifically with what the "L" is for.

the L is for the name only, but still requires the first (and only the first) letter to be uppercased from what I understand.

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