HOWTO: Calculate difference between two dates, including the dates themselves

Recently, I got an email from a client who I have created a Database for using SharePoint Lists.
They had a requirement to find the number of days an event took including the actual start dates and end dates.

So using the Calculated Column, you can create a column as follows
=DATEDIF([Start Date], [End Date],"d").
But this calculation will give you 1 day less the actual number of days.

Modify the calculated column as follows
=DATEDIF(([Start Date]-1), [End Date],"d")
That caters for the difference in days, when you use the initial solution.

Hope this helps someone.

1 comment:

Unknown said...

Thanks - this helped me!