text: Q:
  
  IIF to change the value of a field in a table
  
  I have a table with an int that is formatted like this 20141230 yyyyMMdd
  Not every date is filled out and want to show an other message then #error when I convert the int to a datetime
  =IIF(Fields!LMEXPI.Value = "" OR IsNothing(Fields!LMEXPI.Value), "NoDate", "")
  In the true section I want to add this code 
  =new DateTime(Fields!LMEXPI.Value / 10000, (Fields!LMEXPI.Value / 100) mod 100, Fields!LMEXPI.Value mod 100)
  In the First example it changes the dates that are empty with "NoDate" but when I add the 2nd code block to the IIF expression It completly shuts down and show #error on every row
  
  A:
  
  You'll need to convert the int to a string to get the first condition to not throw #errors, then you should be able to use DateSerial to construct a date with that logic:
  =IIF(CStr(Fields!LMEXPI.Value) = "" OR IsNothing(Fields!LMEXPI.Value), "NoDate", DateSerial(Fields!LMEXPI.Value / 10000, (Fields!LMEXPI.Value / 100) Mod 100, Fields!LMEXPI.Value Mod 100))
  
  