Hi.
I am trying to calculate dates in scripted field.
If I want to calculated between elasticsearch field and date string, what should I do?
I think I need to convert string type date to timestamp.
What is the way to do that?
if('2017-01-01'-doc['WK_DT'].value > 0){
return '2017-01-01'-doc['WK_DT'].value
}else{
return '-1'
}