IIF STATMENT HELP
Any help be appreciate: Problem 1- The format of my Date is like "200912" If I want to pick the last number of the year (9) =IIF Right(Field. Date.Value, 2) = "12", ......,"") Problem 2- IIF (Field. Date.Value is nothing or Field. Date.Value = "", "", IIF Right(Field. Date.Value, 2) < "12", Replace(Replace(cstr(val(left(Field. Date.Value, 4) -1,",",""),".00","")simam
October 26th, 2010 8:07pm

Hello, can you clarify what you want your iif statement to do?
Free Windows Admin Tool Kit Click here and download it now
October 26th, 2010 8:17pm

Iam getting error message Problem 1: IIF( IsNULL(Field. Date.Value) OR (Field. Date.Value) = "" then "" else if right(Field. Date.Value,2) = "12" then (I want to pick 4th number(9) Date format : 200912 Problem 2- IIF( IsNULL(Field. Date.Value) OR (Field. Date.Value) = "" then "" ELse if right(Field. Date.Value,2) <"12" then Replace(Replace(cstr(val(left(Field. Date.Value, 4) -1,",",""),".00","") simam
October 26th, 2010 8:33pm

your syntax is wrong - syntax is as in your 1st post: =IIF(Test, True,False) In your 1st post you are missing brackets and your fields syntax is wrong: =IIF( Fields!Date.Value Is Nothing OR Fields!Date.Value = "" , "" , IIF(right(Fields!Date.Value,2) = "12",mid(Fields!Date.Value,4,1),"Do something Else....")) don;t know what this is trying to achieve: Replace(Replace(cstr(val(left(Field. Date.Value, 4) -1,",",""),".00","") Seems a very long winded way of subtracting 1 from the date part of teh year Might be easier if you try to explain in words what you need to do rather than just posting up bits of formula that dren;t working....would also be useful to know what the error message you are getting is...Rgds Geoff
Free Windows Admin Tool Kit Click here and download it now
October 26th, 2010 8:52pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics