title: Crystal Reports dateadd function error on interval
body: <p>I have a date field on which my inventory item was bought.  Then I have a lifespan field in months eg 240.  Now I am trying to calculate the end of the item's lifespan date but I get an error:</p>
  
  <pre><code>numbervar myVariable := ({TABLE.LIFESPAN} * 30);
  dateadd("d", myVariable,{@date})
  </code></pre>
  
  <p>I get the following error:  <strong>"Date must be between year 1 and 9999"</strong></p>
  
  <p>As soon as I change the variable to: <code>numbervar myVariable := {TABLE.LIFESPAN};</code> 
  it works without any errors.  Also if I change the dateadd formula to <code>dateadd("d", 7200,{@date})</code> it works.</p>
  
  <p>The format of the field TABLE.LIFESPAN is decimal(9,2) but none of the value has decimals, eg it will be 240.00</p>
  
  <p>I have also tried </p>
  
  <pre><code>numbervar myVariable := Round({TABLE.LIFESPAN} * 30);
  </code></pre>
  
  <p>I suspect it has something to do with the decimals.</p>
  
  <p>Help will be greatly appreciated.</p>