Dear All,

Need help! How to use the actual field in a derived column using function DATEADD?

Thanks in advance...

Benjie

This one works, result is 01/01/12
DATEADD("day",112001 % 1000,DATEADD("yyyy",112001 / 1000,(DT_DBTIMESTAMP)"12/31/1899"))

This one failed, ZQDSI is the actual field of the julian date
DATEADD("day",ZQDSI % 1000,DATEADD("yyyy",ZQDSI / 1000,(DT_DBTIMESTAMP)"12/31/1899"))

------------------------------ Error Message

Error at Data Flow Task [Derived Column [3055]]: Attempt to find the input column named "ZQDSI" failed with error code 0xC0010009. The input column specified was not found in the input column collection.

Error at Data Flow Task [Derived Column [3055]]: Attempt to parse the expression "DATEADD("day",ZQDSI % 1000,DATEADD("yyyy",ZQDSI / 1000,(DT_DBTIMESTAMP)"12/31/1899"))" failed and returned error code 0xC00470A2. The expression cannot be parsed. It might contain invalid elements or it might not be well-formed. There may also be an out-of-memory error.

Error at Data Flow Task [Derived Column [3055]]: Cannot parse the expression "DATEADD("day",ZQDSI % 1000,DATEADD("yyyy",ZQDSI / 1000,(DT_DBTIMESTAMP)"12/31/1899"))". The expression was not valid, or there is an out-of-memory error.

Error at Data Flow Task [Derived Column [3055]]: The expression "DATEADD("day",ZQDSI % 1000,DATEADD("yyyy",ZQDSI / 1000,(DT_DBTIMESTAMP)"12/31/1899"))" on "output column "Derived Column 1" (3307)" is not valid.

Error at Data Flow Task [Derived Column [3055]]: Failed to set property "Expression" on "output column "Derived Column 1" (3307)".