Difference betseen two datetime

Goodmorning,
I need to calculate the difference in hours between two datetime values (dd/mm/yyyy hh:mm:ss). How can i perform this operations?

Thanks

have you tried to set both as DateTime and result as duration ?

[Duration between two Time values](https://community.appsheet.com/t/duration-between-two-time-values/11359) Questions

Hi everyone, I’ve noticed that the formula given to calculate the difference between two time values in the documentation doesn’t work great when trying to calculate the duration of someones sleep (for example). Here’s the formula: IF(([StopTime] > [StartTime]), ([StopTime] - [StartTime]), (([StopTime] + 24) - [StartTime])) When the [Start Time] = “13:00:00” and [End Time] = “15:00:00” the DURATION result is correct. But when we have a [Start Time] = “22:00:00” and [End Time] = “07:00:00” th…

2 Likes

Perfect!! Solved, thank you

2 Likes