Date format MM/dd/yyyy hh:MM:ss tt


(coys) #1

Hello, I have a date in the following format 7/12/2012 1:06:47 AM. Can
I still map it in elasticsearch? If yes what should i specify the
format as?
I earlier had a date in MM/dd/yy format and I was able to map it using
{"type":"date", "format":"MM/dd/yyyy" } and my range queries work but
when I try to do the same now using {"type":"date", "format":"MM/dd/
yyyy hh:MM:ss tt" } elasticsearch does not let me. Thanks.


(Igor Motov) #2

I think you meant this: "MM/dd/yyyy hh:mm:ss a"

On Thursday, July 12, 2012 12:42:00 PM UTC-4, coys wrote:

Hello, I have a date in the following format 7/12/2012 1:06:47 AM. Can
I still map it in elasticsearch? If yes what should i specify the
format as?
I earlier had a date in MM/dd/yy format and I was able to map it using
{"type":"date", "format":"MM/dd/yyyy" } and my range queries work but
when I try to do the same now using {"type":"date", "format":"MM/dd/
yyyy hh:MM:ss tt" } elasticsearch does not let me. Thanks.


(coys) #3

Thanks a lot again Igor! :slight_smile:


(system) #4