I have an column in my source table as [Valyyyymmdd] [nvarchar](24) NULL:
Valyyyymmdd
=================
20130503
20120403
00000000
20110523
20100715
I want to get the difference with getdate(), so I used the below query in my source
DATEDIFF(DAY, IIF( [Valyyyymmdd] = '00000000', CONVERT(VARCHAR(8), GETDATE(), 112), [Valyyyymmdd]) , getdate()) as SalesStageAging
but I need to get the Valyyyymmdd and do ssis derived column to get the difference in date resulting in int value.
Kindly provide me the expression which has to be written in derived column expression