Calculate duration of events in a Calendar

Hello, does anyone know how to calculate the duration of an event in a Calendar? If have been told that it could possibly be achieved via Javascript, but I do not know how to do it.

I have a Date/Time field and I would like to register the duration of the event in another field.

Any clues? Thanks!

Hi,

It is desribed here how to extract start & end time of an event:

https://support.knack.com/hc/en-us/articles/360015346072-How-to-Extract-the-Start-and-End-Dates-from-a-Date-Field

Next step could be calculating event duration...