You can use Date function calls to get the time difference between StartTime and EndTime as a decimal value as described here: https://docs.mendix.com/refguide/between-date-function-calls
You can then round (or floor or ceil) that value to an integer as described here: https://docs.mendix.com/refguide/mathematical-function-calls
To display this value in a grid, you will need an integer attribute member on your entity. This could be a calculated attribute as described here:
If the data source of your list is a microflow, you can calculate the value in this microflow in a loop, then you would not need a calculated attribute.
Hope this helps,