How to calculate difference of two dates and display the result in seconds(integer type) through scripted fields in kibana

Hello,

Unfortunately that is not possible:
https://www.elastic.co/support/matrix#matrix_compatibility

Thanks,
Bhavya