Any help greatly appreciated. I'm using SharePoint 2010, typical TASK LIST. I want to put in a start date and a a due date but have a field (column) that displays the MID WAY POINT between those two dates. Thanks Valerie
2 Answers
Create a calculated column and set the fomula to this:
=[Start Date]+ROUND(DATEDIF([Start Date],[Due Date],"d")/2,0)
This gets the difference between the 2 dates and divides by 2, rounds to the nearest integer, then adds the result to the start date.
Here is a reference to formulas you can use in a calculated column:
-
Thanks, Laurie. that sounds like just what I wanted. I'll check out the link too.– user3320Commented May 12, 2011 at 16:47
An alternative formula for @Laurie's Calculated column suggestion would be:
=AVERAGE([Start Date],[Due Date])
-
-
@Laurie: I didn't until just a short while ago either. :) I saw your formula and thought: "That looks like an average function. Hmm...". My guess is that it converts the dates to their numeric versions to go through the function and then back again afterwards.– Stu PeggCommented May 9, 2011 at 15:35
-
No need to convert, dates are stored as numeric values (number of days). Then they can be rendered as date if you choose date as output format for the calculated column. Commented Feb 9, 2012 at 17:59
-
@Christophe: Fair point, I've seen that this is the case since posting this comment; while dealing with HTMLCC and also with Excel exports.– Stu PeggCommented Feb 9, 2012 at 20:34