Forum Discussion
HassaanAhmed
Dec 01, 2022Copper Contributor
Need help calculating the difference between two dates and times
Hi Everyone! I need to calculate the difference between two times on different dates in excel. I know this is an easy ask if I use the timestamp number format, however, for operational reasons, d...
- Dec 01, 2022
HassaanAhmed Calculating with dates and times like this is tricky. you need to introduce the MOD function to take only the decimal part of the date.time value.
By the way, I prefer to calculate with the TIME function when adding hours. See attached.
Note also that the 00:00 hour should always be the last hour for the day. On row 14 you had this hour on September 1.
Riny_van_Eekelen
Dec 01, 2022Platinum Contributor
HassaanAhmed Calculating with dates and times like this is tricky. you need to introduce the MOD function to take only the decimal part of the date.time value.
By the way, I prefer to calculate with the TIME function when adding hours. See attached.
Note also that the 00:00 hour should always be the last hour for the day. On row 14 you had this hour on September 1.
HassaanAhmed
Dec 01, 2022Copper Contributor
Thank you! This is exactly what I needed