A customer recently contacted me with an interesting question.
They were using a SharePoint task list to help schedule jobs for field engineers but rather than have a Start Date and End Date field they wanted to have a Start Date and Duration field and automatically work out the End Date.
So End Date = Start Date + Duration
They were then planning to display this using Planner in the By Category view which is idea for resource booking as it makes it easy to see when a resource is booked or free (SharePoints built in gantt chart can’t do this swimlane style of view and doesn’t support using calculated columns).
Now this is easy to do if the Duration is specified in days – in fact you just use the equation above – but what if Duration is in hours or minutes?
First port of call is this page from Microsoft showing examples of common date time formula you can use in SharePoint calculated columns hmmm, adding days OK… adding months Check… adding years OK too….but nothing about hours. Back to the drawing board.
The key bit of knowledge is that SharePoint stores all date/time values internally as the number of days since Jan 1st, 1900. So the number 100.5 in a date/time field is 100 days and 12 hours from 1st Jan 1900 at 00:00
Related posts:
- Working Days, Weekdays and Holidays in SharePoint Calculated Columns This post shows you how to work with weekdays and...
- The Truth about using [Today] in SharePoint Calculated Columns This post offers workaround for using values like [Today] and...
- Tip – Showing multiple columns in SharePoint Planner Webpart This post shows how to show data from more than...
- Using [Today] in SharePoint calculated default values You can't use Today in SharePoint calculated columns but you...
- SharePoint Staff Vacation Planner – DIY Guide part 3 – set up an Absences to Date Dashboard SharePoint Staff Vacation Planner DIY Guide Part 3, set up...
Tags: Calculated Columns, Formula, SharePoint, Tip




Thanks Ryan. Can never have enough calculated formulas we can just copy and paste, keep ‘em coming.