Elasticsearch date format am pm

In elasticsearch how to index a doc with date format 2017-08-27 01:34:15 PM

i think we have to store the date in 24 hours Y-m-d\TH:i:s (PHP format) format and for display, we use our programing language(PHP) to convert 24 hours to 12 hours with am or pm.

You can refer to the documentation for in built date format supported by ES.

Also, if none of the in built formats is suitable for you, then you can create a custom date format. It follows the Joda time date format. You can find that here

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