Trying to calculate hours between two dates on a SharePoint List

Copper Contributor

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 within 24 hours.

 

J

4 Replies

Hi @Jbrines1969,

 

Here is a formula, which will calculate hour difference between two dates.

=INT(Modified-Created)*24+HOUR(Modified-Created) 

@Matti Paukkonen 

 

Is it possible to get the hours between a modified date and Now or Today?

@Jbrines1969 

 

That is not going to work, because calculated field values are only updated when list items is modified.

@Matti Paukkonen 

 

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