Scripted field to calculate duration

I made an error in the first response, probably that's why it didn't work, sorry! I see in your field list that your fields are of proper type, so it should be working with this configuration: