Pipelines get event.duration from event.start and event.end

what can i do in an elastic search pipeline to workout the event.duration from event.start and event.end

A script processor should help to compute that value.

I thought as much but im not really sure how I should do it any ideas? not very familiar with painless/scripting both fields I either epoc or converted using the date

Not familiar too but you can probably start with: