title: REPLACE NULL IN SSIS Derived Column
body: <p>I have an SSIS package which transfers data from SAS to SQL Server. I'm creating a derived column but cannot get the <code>REPLACENULL</code> feature to work. I am receiving the error </p>
  
  <blockquote>
    <p>"Invalid character value for cast specification" </p>
  </blockquote>
  
  <p>which I am sure is because of NULL values in the source. Here is my current derived column expression:</p>
  
  <pre><code>REPLACENULL(DATEADD("d",(DT_I8)AuthEndDate,(DT_DATE)"1960-01-01"),0)
  </code></pre>
  
  <p>The <code>REPLACENULL</code> function isn't working here. Any way that this can be done? I am using SSIS 2008. Thanks.</p>