ScriptedField Time format question

Hello,

I am trying to get something like the Hour of day bar histogram that is
demonstrated on this page working:

It says to create a scripted field based on the timestamp like this:

Integer.parseInt(new Date(doc['OpenedDate'].value).format("H"))

I added my datetime field (openedDate) but it gives me and error when i got
to discover (an error occurred with your request).

I also tried swapping out my datetime field with the @timestamp field (as
per the sample) but i got the same error.

Any help would be appreciated.

Thanks,

--
Please update your bookmarks! We have moved to https://discuss.elastic.co/

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2e5f02bc-6841-41aa-aaaf-8abc85577a78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.