AClerk
May 11, 2021, 11:04pm
2
There are dozens of examples out there.
Here are a couple of them -->
Hi All,
I am trying to create a new scripted field by calculating the difference(in seconds) between 2 date in the following format `
October 15th 2018, 22:15:27.823
The two fields I am using are start_time and end_time.
I have tried various method covering both Painless and expression as language.
Every time I try I get different error.
Example:-
if(!doc['end_time'].empty)
{
return doc['end_time'].value - doc['start_time'].value
}
Error it gave is:-
"caused_by":{"type":"parse_except…
I have two date fields - Date1 and Date2, both are in date format
I want to calculate days between the two dates.
I tried doc['date2'].value - doc['date1'].value, this is not giving the expected return value