Value for monthofyear must be in range

I have data in elasticsearch and the date format is like:
2017/12/22 12:13:25

when i index this into kibana, it recognizes it as a date, but when i try to visualize anything i get:

failed to parse date field [12/22/2017] with format [yyyy/MM/dd HH:mm:ss || yyyy/MM/dd ||epoch_millis]...........Value 22 for monthofyear must be in the range

when i try any other date format, it comes in as a string and i've also tried scripting :

new SimpleDateFormat('dd/MM/YYYY' HH:mm:ss).parse(doc['Date'].value);

but this doesn't seem to fix it, as a string with newDate column i get an error of
unrecognized characters at the end of [2017/12/22]: [/12/22 00:00:00]" }}}]}, "status":400
Any ideas how to fix this?

Hmm, sounds strange. Could you provide the mapping for your index? Have you set this field as your date field in your index pattern settings?

i've changed my mappings quite a few times back and forth between date and string for my date data. yes, during create index pattern, i select my Date column as date, but it just errors out on trying to visualize anything, whether i use the date data or not

  {  
   "testdatabase.testcollection":{  
      "aliases":{  

      },
      "mappings":{  
         "_doc":{  
            "properties":{  
               "Attribute":{  
                  "type":"text",
                  "fields":{  
                     "keyword":{  
                        "type":"keyword",
                        "ignore_above":256
                     }
                  }
               },
               "Date":{  
                  "type":"date",
                  "format":"yyyy/MM/dd HH:mm:ss||yyyy/MM/dd||epoch_millis"
               },
               "Value":{  
                  "type":"float"
               },
               "filename":{  
                  "type":"long"
               }
            }
         }
      }
   }
}

Do you get the same errors in Discover? Can you take a screenshot?

no, but interestingly, after i used discover, the errors disappeared from visualize. it looks like i'm able to query dates now. When loading data, should i use discover prior to visualizing? Very strange its working now and i've been at this loading / reloading reformatted data for several hours

it seems fixed now, sorry for wasting your time. we can probably delete this post

You definitely didn't waste my time... This is really bizarre. It seems like there might be a bug here. If you see this error again, please take a screenshot so we can figure out exactly what's happening. Thanks!

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