[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
Solved

# Sharepoint 3.0 Duration Data Calculation

Posted on 2012-09-20
Medium Priority
247 Views
Last Modified: 2012-10-15
Hi there,

I would like to, using a calculated field, work out the time taken in days between the field [Date Started] and [Date Completed].

I was using the example here: http://rmanimaran.wordpress.com/2011/02/11/sharepoint-tasks-list-add-a-duration-calculated-column/

=IF(OR(ISBLANK([Date Completed]),ISBLANK([Date Started])),0,FIXED([Date Completed]-[Date Started],0))

This will show whole days only but doesnt round up to 1 if the Start and End Date are the same day.

Is there an easy way to this with the code above. I can't say I'm over-clued on the subject.
0
Question by:ultra-it
2 Comments

LVL 21

Assisted Solution

66866 earned 1000 total points
ID: 38417720
In your IF statement, add another IF that checks the value of [Date Started] and [Date Completed] and if they are the same return 1, if not proceed with the remaining piece of logic.
0

LVL 44

Accepted Solution

Rainer Jeschor earned 1000 total points
ID: 38417765
Hi,
this should do the trick (just the code for 66866 comment):
``````=IF(OR(ISBLANK([Date Completed]),ISBLANK([Date Started])),0,IF([Date Completed]-[Date Started],FIXED([Date Completed]-[Date Started],0),1))
``````

HTH
Rainer
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Screencast - Getting to Know the Pipeline
###### Suggested Courses
Course of the Month18 days, 4 hours left to enroll

#### 829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.