Solved

How to check in the existing formula in SharePoint calculated field and check the date field against current date

Posted on 2011-02-24
3
703 Views
Last Modified: 2012-05-11
I have the following formula in SharePoint calculated field in a list. This one determines the Quarter based on the month in Deployment Start Date. Now I want to include in the formula
that if Deployment Start Date is past the Current Date or System Date then use a different date called Deployment End Date. How to include that in the below formula?


=IF([Deployment Start Date]=0,0,(CONCATENATE(RIGHT(YEAR([Deployment Start Date]),2),"Q",IF(MONTH([Deployment Start Date])<=3,1,IF(AND(MONTH([Deployment Start Date])>=4,MONTH([Deployment Start Date])<=6),2,IF(AND(MONTH([Deployment Start Date])>=7,MONTH([Deployment Start Date])<=9),3,IF(AND(MONTH([Deployment Start Date])>=10,MONTH([Deployment Start Date])<=12),4,0)))))))


0
Comment
Question by:vmandem
3 Comments
 
LVL 6

Accepted Solution

by:
psv1973 earned 38 total points
ID: 34980231
The followign will give you the difference in days between the two dates,

DATEDIF(Now, [Deployment Start Date ],"d")

For more info please look here:

http://msdn.microsoft.com/en-us/library/bb862071.aspx


BTW: isn't 75 points a bit low for this?
0
 
LVL 9

Assisted Solution

by:irinuc
irinuc earned 37 total points
ID: 34988558
Hi,

i'm unclear if in your situation "Current Date" and "System Date" are 2 columns in the list or you're simply thinking to compare to Today. If the second case, then this is not possible. Here is a link where you will find more details on why this is not working.
http://stackoverflow.com/questions/878744/any-solution-to-the-today-calculated-column-problem-is-sharepoint
Today can only be used in views; and maybe you can use this piece of information to workaround your problem. It really depends on what is the use of this formula.

hope this helps
0
 

Author Closing Comment

by:vmandem
ID: 35014501
partial
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Before you can digitally sign infopath forms, you must have a digital certificate. Microsoft Certificate Services will need to be enabled on a Windows Server 2008 to facilitate the creation and verification of the digital certifciates on the web ser…
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

706 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

22 Experts available now in Live!

Get 1:1 Help Now