Using calculated values and with the assistance of the moment.js library you can easily display the difference between two date/time fields within Team Forms. This is demonstrated in the example form in the link below.
Drag and drop two separate date/time fields into your form.
Drag and drop a number field into your form to represent the time difference. In this example we will calculate this in minutes, however you can easily adapt these steps for the units that you want (e.g. minutes, days or seconds)
In the data tab of the number field scroll down to the calculated value section and enter in the following JavaScript code. Note that you will need to adapt the code to match the API key of the two date fields in your form.
โvalue = moment(data.endDate).diff(data.startDate, 'hours')