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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Read about achieving the basic levels of HRIS security in the workplace.
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…

825 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