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
712 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
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…

932 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

10 Experts available now in Live!

Get 1:1 Help Now