?
Solved

SharePoint calculated column formula

Posted on 2013-06-14
1
Medium Priority
?
471 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 1400 total points
ID: 39249835
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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

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. …
If you create your solutions on SharePoint sooner or later you will come upon a request to set  permissions of the item depending on some of the item's meta-data - the author, people assigned as approvers, divisions, categories etc. The most natu…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

765 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