we store duration in seconds, but we need the ability to render them as minutes or (or ideally, and) hours.
In Elasticsearch we map the seconds field as number but in Kibana 4.1.1 I do not not have the option to convert in date.

+1 for this - would be really helpful. This wasn't included in #1543.
I used the Number format and '00:00:00' as formatting pattern and seems to do the trick (see https://adamwdraper.github.io/Numeral-js/ the "Time" section). Is that what you are looking for?
+1. It seems like this is "almost" there. The '00:00:00' format gets us hours, minutes, and seconds, but some of our durations are days long, so showing 73:15:30 on the dashboard isn't exactly what the business is usually looking for (they would expect to see 3.05 days). Would think this would have to be moment.js since Numeral-js only supports very basic time parsing.
This would be tremendous to be able to convert milliseconds/microseconds on the y-axis, e.g.: plotting request service time.
Thanks for adding the duration type. Unfortunately, it doesn't work well with small intervals, like microseconds and nanoseconds, especially on the y-axis:

I would expect something like this:
93.387ms
283碌s
3s
@kofemann What if you pick a field _output format_ other than Human Readable?
@bevacqua this will work, of course, but difference between microseconds and seconds is 1e6. So you really have to count number of '0' to get the right number ( well, commas help). Nevertheless, I prefer Human Readable :)
moment's human-readable relative time format _(what we use to display relative time in "human speak")_ isn't really capable of handling sub-second precision. Using another output format will have to do.
If you think we should add sub-second precision to the human readable format please open a new issue. Thank you! :tada:
The beats and Co. have many metrics which wich have time intervals in sub-second range. To make dashboards more user-friendly, support sub-second precision will really help. I will open a new issue. Thanks.
Most helpful comment
I used the
Numberformat and'00:00:00'as formatting pattern and seems to do the trick (see https://adamwdraper.github.io/Numeral-js/ the "Time" section). Is that what you are looking for?