[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
2
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
Comment
Question by:ultra-it
2 Comments
 
LVL 21

Assisted Solution

by:66866
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

by:
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))

Open in new window


HTH
Rainer
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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

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.

Join & Ask a Question