Home
> SharePoint > Calculate Hours in SharePoint Calculated Column
Calculate Hours in SharePoint Calculated Column
It is a common formula for calculating days between two date column on SharePoint by using =DATEDIF([StartDate],[EndDate],’d), However there’s a date-time format on SharePoint column,e.g. 05/23/2011 7:00 AM to 05/23/2011 4:00 PM and we need to create a calculated column to count the difference in hour ? can we just use DATEDIF ? No , It won’t work! It is a little bit tricky but you could use the following function where…
[Start Time] column 05/23/2011 7:00 AM
[End Time] column 05/23/2011 4:00 PM
=IF(NOT(ISBLANK([End Time])),([End Time]-[Start Time])*24,0) -> it will give you 9 hour for differences
Categories: SharePoint
what about a formula for difference in minutes? i would assume its changing the end of that formula. I have yet to test it out but i think it would be something like the following:
=IF(NOT(ISBLANK([End Time])),([End Time]-[Start Time])*24*60,0)