Solved

SharePoint calculated column formula

Posted on 2013-06-14
1
431 Views
Last Modified: 2013-06-17
I need the formula that calculates difference between two dates but only when date2 is present. So I know that I need =DATEDIF(date1, date2,"d") but I don't know how to check if the date2 is present. When there is no date2 it should say 'na'.
0
Comment
Question by:MisUszatek
1 Comment
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 350 total points
Comment Utility
Hi,
this formula will work:
=IF(OR(LEN([Date1])=0,LEN([Date2])=0),"na",DATEDIF([Date1],[Date2],"d"))

Open in new window

HTH
Rainer
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
When installing SharePoint 2010 RTM I came across a strange error, I was getting timeouts during the installation. I searched the web and found the best solution to be found here (http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010genera…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now