title: Derived Column Editor
body: <p>I need to assign a formatted date to a column in a data flow. I have added a Derived shape and entered the following expression for a NEW column - Derived Column = "add as new column":</p>
  
  <pre><code>"BBD" + SUBSTRING((DT_WSTR,4)DATEADD("Day",30,GETDATE()),1,4) + 
  SUBSTRING((DT_WSTR,2)DATEADD("Day",30,GETDATE()),6,2) + 
  SUBSTRING((DT_WSTR,2)DATEADD("Day",30,GETDATE()),9,2)
  </code></pre>
  
  <p>The problem is that the <em>Derived Column Transformation Editor</em> automatically assigns a Data Type of <code>Unicode string[DT_WSTR]</code> and a length of "7". Howver, the length of a string is 11, therefore the following exception is thrown each time:</p>
  
  <pre><code>[Best Before Date [112]] Error: The "component "Best Before Date" (112)" failed 
  because truncation occurred, and the truncation row disposition on "output column
  "Comments" (132)" specifies failure on truncation. A truncation error occurred 
  on the specified object of the specified component.
  </code></pre>
  
  <p>Does anyone know why the edit is insisting on a length of 7? I don't seem to be able to change this.</p>
  
  <p>Many thanks,</p>
  
  <p>Rob.</p>