title: SSRS IIF Date evaluation
body: <p>I have the following code</p>
  
  <pre><code>=IIf(Fields!Freeze.Value, Fields!effectivedate.Value, IIF(Month(Fields!effectivedate.Value) &lt;&gt; Month(Now()), Format(Now(), “MM/dd/yyyy”) , Fields!effectivedate.Value))
  </code></pre>
  
  <p>A. In the first IIF statement I check to see if the Fields!Freeze.Value is true, if its true then It displays Fields!effectivedate.Value  (IIf(Fields!Freeze.Value, Fields!effectivedate.Value)</p>
  
  <p>B. In the second IIF statemenet I check if the Fields!effectivedate.Value is the current month, If it is the current month then it displays Fields!effectivedate.Value, If it is not the current month then it displays the current date.</p>
  
  <p>I would like assistance on the following.</p>
  
  <p>In the first IIF statement ,>>> <code>IIf(Fields!Freeze.Value, Fields!effectivedate.Value,</code>
  I want to evaluate a new value  Fields!FreezeDate.value</p>
  
  <ol>
  <li>If the Fields!Freeze.Value = true then  check to see if the Fields!effectivedate.Value is 30 days or more less than Fields!FreezeDate.value. 
  A.  If its 29 days or less than Fields!FreezeDate.value then display Fields!effectivedate.Value
  B.  If its 30 days or more less than the Fields!FreezeDate.value then display the Fields!FreezeDate.value</li>
  </ol>
  
  <p>Example 1 </p>
  
  <pre><code> Fields!FreezeDate.value  = '12/30/2012'
   Fields!effectivedate.Value = '11/15/2010'
  
  
   then Display the Fields!FreezeDate.value
  </code></pre>
  
  <p>Example 2</p>
  
  <pre><code> Fields!FreezeDate.value  = '12/30/2012'
   Fields!effectivedate.Value = '12/15/2010'
  
  
   then Display the Fields!effectivedate.Value
  </code></pre>
  
  <p>How would I write this in SSRS code?</p>
  
  <p>Please ask for further clarification if i have failed to explain something properly.</p>