Hi ,
i try to create a new scripted field by calculating the difference(in minitues) between 2 dates in the following format :
bookingStatus.confirmed :Jan 22, 2020 @ 12:20:00.000
bookingStatus.wating :Jan 20, 2020 @ 10:20:00.000
i like the result be like : Xdays ,Xhours, Xminutes
in this case duration = 2 days , 2 hours ,0minutes
i try this expression but i don't get the correct result:
The difference between those is roughly two days (20th of January to 22nd of January) - the "human readable" format will do some rounding to get a nice representation. It's currently not possible to get an exact duration in a human readable form, to replicate something like this you could try to implement it yourself in the scripted field and return a string instead.
It's possible to use the scripted field on an x axis, but not as a histogram, but as an ordinal "terms" scale. So the distance between two statusDates on the axis won't be in scale with the duration
That's not possible with a string field, you will need to use your original number scripted field with a duration field formatter. The exact value you unfortunately can't show this way.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.