Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dates Formula: Compare and color 1

Status
Not open for further replies.

nb4884

IS-IT--Management
Aug 2, 2010
141
US
Hi All,

Need help with building the formula for background colorization.
Using CR XI

I have 2 dates columns.

1 is End Date displayed as MM/dd/yyyy (date-time though)
2 is TGT Year displayed as YYYY (date-time though)

Now i want to write a formula for coloring End Date per the below condition:

If End Date is before Jan of the TGT Year then red
if End Date is between Jan 1- March 31 of the TGT Year then blue
If End Date is after March 31 of the TGT Year then green


Thanks a lot
 
if {End Date} < date(year(TGT),1,1) then
crRed else
if {End Date} in date(year(TGT),1,1) to
date(year(TGT),3,31) then
crBlue else
if {End Date} >= date(year(TGT),4,1) then
crGreen

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top