June 8, 2010 at 7:40 am
=Iif
(
(DateDiff("m",CDate(Fields!ActsDate.Value),CDate(Fields!ItemDate.Value))>=6
Or
(DateDiff("m",CDate(Fields!ActsDate.Value),CDate(Fields!DecisionDate.Value))>=6,"Red","Black"
)
I am using this expression for changing the color...
Help me how to change the color of the row if the date diff between 2 columns dates > 6 months
thanks in advance
June 8, 2010 at 7:51 am
Trying using a switch Case Like Below
=Switch(DateDiff("m",CDate(Fields!ActsDate.Value),CDate(Fields!DecisionDate.Value))>=6,"Red",DateDiff("m",CDate(Fields!ActsDate.Value),CDate(Fields!DecisionDate.Value))>=6,"Black")
June 8, 2010 at 8:58 am
Thanks
It doesnt work
June 9, 2010 at 1:52 pm
Try the following modification to the Switch statment (changed the arithmetic operators)
=Switch(DateDiff("m",CDate(Fields!ActsDate.Value),CDate(Fields!DecisionDate.Value))>6,"Red",DateDiff("m",CDate(Fields!ActsDate.Value),CDate(Fields!DecisionDate.Value))<=6,"Black")
June 10, 2010 at 8:05 am
lynns (6/9/2010)
Try the following modification to the Switch statment (changed the arithmetic operators)=Switch(DateDiff("m",CDate(Fields!ActsDate.Value),CDate(Fields!DecisionDate.Value))>6,"Red",DateDiff("m",CDate(Fields!ActsDate.Value),CDate(Fields!DecisionDate.Value))<=6,"Black")
lol 🙂 Thanks for correcting it Lynn
June 14, 2010 at 7:14 am
I have the dates coming in varchar format.how can use the above expression in color..
June 14, 2010 at 7:20 am
=Iif(DateDiff(
"m",CDate(Fields!ActsDate.Value),CDate(Fields!ItemDate.Value)
)>=6,"Red","Black")
getting error in this...
Fields!ActsDate.Value and Fields!ItemDate.value are coming varchar format
June 14, 2010 at 8:02 am
Are the fields ActsDate and ItemDate both varchar datatype in the original data source? If so, maybe this will work for you.
=IIF(DateDiff("m", CAST(Fields!ActsDate.Value, datetime), CAST(Fields!ItemDate.Value, datetime))>=6,"Red","Black")
June 14, 2010 at 8:05 am
oops....I meant to use the CONVERT function
Are the fields ActsDate and ItemDate both varchar datatype in the original data source? If so, maybe this will work for you.
=IIF(DateDiff("m", CONVERT(Fields!ActsDate.Value, datetime), CONVERT(Fields!ItemDate.Value, datetime))>=6,"Red","Black")
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply