Forum Discussion
Jbrines1969
Dec 18, 2020Brass Contributor
Trying to calculate hours between two dates on a SharePoint List
Hi Guys, I am trying to calculate hours between created and modified date, I have tried =TEXT(Modified-Created,"h") but it doesn't work. I have read that it only really works if it is wit...
Matti Paukkonen
Dec 19, 2020Iron Contributor
Hi Jbrines1969,
Here is a formula, which will calculate hour difference between two dates.
=INT(Modified-Created)*24+HOUR(Modified-Created)
Jbrines1969
Dec 21, 2020Brass Contributor
- Matti PaukkonenDec 22, 2020Iron Contributor
That is not going to work, because calculated field values are only updated when list items is modified.
- Jbrines1969Dec 22, 2020Brass Contributor
So this calculation to get Days Old isn't really showing a true calculation?
=IF(LEN([Date Assigned to Sub])=0,0,DATEDIF([Date Assigned to Sub],TODAY(),"d"))
If it is then is there any way of changing it calculate hours.
This was created when I created the SharePoint list by the system