SSIS Error : Error at Write intermediary data [Derived Column ] : The function "DATEDIFF" does not support the datatype "DT_WSTR" for parameter number
I am trying to calculate the datediff logic using derived column.
(DT_DBDATE) "2014-01-31" < ((DT_DBDATE) [maturityDate]) ? NULL(DT_DBDATE) : DATEDIFF( "d","2014-01-31",((DT_DBDATE) [maturityDate]) )
but this is giving me error, maturity date is also datetime datatype.i am getting the following error.
Solution : @[User::DataDate] > maturityDate || ISNULL(maturityDate) ? NULL(DT_NUMERIC,10,3) : DATEDIFF("dd",(DT_DBTIMESTAMP)@[User::DataDate],(DT_DBTIMESTAMP)maturityDate) / 365.25
(DT_DBDATE) "2014-01-31" < ((DT_DBDATE) [maturityDate]) ? NULL(DT_DBDATE) : DATEDIFF( "d","2014-01-31",((DT_DBDATE) [maturityDate]) )
but this is giving me error, maturity date is also datetime datatype.i am getting the following error.
Solution : @[User::DataDate] > maturityDate || ISNULL(maturityDate) ? NULL(DT_NUMERIC,10,3) : DATEDIFF("dd",(DT_DBTIMESTAMP)@[User::DataDate],(DT_DBTIMESTAMP)maturityDate) / 365.25
Comments
Post a Comment