Notice that there are three different examples of how to work with the derived column… The first example uses a DT_WSTR column and outputs a NEW column with a data type of DT_WSTR. The second example does exactly the same thing, except the output data type for a second, new column is DT_I4 (integer). The third example actually replaces an integer column, ClientNumber with the values of the conditional expression.
If you are working on date fields, DT_STR input types can be implicitly cast to date data types. An example follows. The input column, [column10] is of type DT_STR.