Solved

SharePoint calculated column formula

Posted on 2013-06-14
1
461 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Anchor text-decoration on a MasterPage 7 60
SharePoint 2010 Errors on SBS2011 8 66
Sharepoint List View 6 36
Sharepoint 2010 Auditing 4 35
The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
In case you ever have to remove a faulty web part from a page , add the following to the end of the page url ?contents=1
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

828 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