I'm trying to visualize the time difference (in hours) between two date fields.
The fields are declared like this:
"fieldname": {
"type": "date"
},
The solution I found was:
,
"script_fields" : {
"timedifference" : {
"script" : "doc['loading_startTime'].value - doc['startTime'].value"
}
}
The result I get is as follows:
I'd like this number to be in either seconds, minutes or hours, what am I doing wrong?