0xC0047080.

Hi All,
I'm getting two date fields from a flat file and i'm using a derived column to compute the difference between the dates and i'm using the following expression.
( [DtWarrantStart]  > 0 ? (( [DtWarrantStart] - [DtWarrantEnd] ) >= 0 ? ( [DtWarrantStart]  - [DtWarrantEnd]) : -1) : 0)
When i use the above expression i'm gettng them in RED letters and when i hover my mouse over it i'm seeing the following error message:
Error at Load Inactive Cases [Compute Inactive Days [34]]: The data types "DT_WSTR" and "DT_I4" are incompatible for binary operator ">". The operand types could not be implicitly cast into compatible types for the operation.
To perform this operation, one or both operands need to be explicitly cast with a cast operator.
Error at Load Inactive Cases [Compute Inactive Days [34]]: Attempt to set the result type of binary operation "DtWarrantStart > 0" failed with error code 0xC0047080.
Error at Load Inactive Cases [Compute Inactive Days [34]]: Computing the expression "( [DtWarrantStart] 
> 0 ? (( [DtWarrantStart] - [DtWarrantEnd] ) >= 0 ? ( [DtWarrantStart] 
- [DtWarrantEnd]) : -1) : 0)" failed with error code 0xC0047084. The expression may have errors, such as divide by zero, that cannot be detected at parse time, or there may be an out-of-memory error.
Error at Load Inactive Cases [Compute Inactive Days [34]]: The expression "( [DtWarrantStart] 
> 0 ? (( [DtWarrantStart] - [DtWarrantEnd] ) >= 0 ? ( [DtWarrantStart] 
- [DtWarrantEnd]) : -1) : 0)" on "output column "WarrantStartDate" (65)" is not valid.
Error at Load Inactive Cases [Compute Inactive Days [34]]: Failed to set property "Expression" on "output column "WarrantStartDate" (65)".
Both the date fields are in the following format
"12072013","31129998",
Please need help.
Thanks

Thanks Mike for all the effort and help. I'm using the following expression and still ending with the error.
(DT_I4)DtWarrantStart > 0 ? ((DT_I4)DtWarrantEnd > 0 ? (DATEDIFF("DAY",(DT_DATE)(SUBSTRING(DtWarrantStart,5,4)
+ "-" + SUBSTRING(DtWarrantStart,3,2) + "-" + SUBSTRING(DtWarrantStart,1,2)),(DT_DATE)(SUBSTRING(DtWarrantEnd,5,4) + "-" + SUBSTRING(DtWarrantEnd,3,2) + "-" + SUBSTRING(DtWarrantEnd,1, 2))) > 0 ? DATEDIFF("DAY",(DT_DATE)(SUBSTRING(DtWarrantStart,5,4)
+ "-" + SUBSTRING(DtWarrantStart,3,2) + "-" + SUBSTRING(DtWarrantStart,1,2)),(DT__DATE)(SUBSTRING(DtWarrantEnd,5,4) + "-" + SUBSTRING(DtWarrantEnd,3,2) + "-" + SUBSTRING(DtWarrantEnd,1,2))) : -1) :-1) :0
Error:
TITLE: Microsoft Visual Studio
Error at Load Inactive Cases [Compute Inactive Days [34]]: Attempt to find the input column named "DT__DATE" failed with error code 0xC0010009. The input column specified was not found in the input column collection.
Error at Load Inactive Cases [Compute Inactive Days [34]]: Attempt to parse the expression "(DT_I4)DtWarrantStart > 0 ? ((DT_I4)DtWarrantEnd > 0 ? (DATEDIFF("DAY",(DT_DATE)(SUBSTRING(DtWarrantStart,5,4)
+ "-" + SUBSTRING(DtWarrantStart,3,2) + "-" + SUBSTRING(DtWarrantStart,1,2)),(DT_DATE)(SUBSTRING(DtWarrantEnd,5,4) + "-" + SUBSTRING(DtWarrantEnd,3,2) + "-" + SUBSTRING(DtWarrantEnd,1, 2))) > 0 ? DATEDIFF("DAY",(DT_DATE)(SUBSTRING(DtWarrantStart,5,4) +
"-" + SUBSTRING(DtWarrantStart,3,2) + "-" + SUBSTRING(DtWarrantStart,1,2)),(DT__DATE)(SUBSTRING(DtWarrantEnd,5,4) + "-" + SUBSTRING(DtWarrantEnd,3,2) + "-" + SUBSTRING(DtWarrantEnd,1,2))) : -1) :-1) :0" 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 Load Inactive Cases [Compute Inactive Days [34]]: Cannot parse the expression "(DT_I4)DtWarrantStart > 0 ? ((DT_I4)DtWarrantEnd > 0 ? (DATEDIFF("DAY",(DT_DATE)(SUBSTRING(DtWarrantStart,5,4) + "-"
+ SUBSTRING(DtWarrantStart,3,2) + "-" + SUBSTRING(DtWarrantStart,1,2)),(DT_DATE)(SUBSTRING(DtWarrantEnd,5,4) + "-" + SUBSTRING(DtWarrantEnd,3,2) + "-" + SUBSTRING(DtWarrantEnd,1, 2))) > 0 ? DATEDIFF("DAY",(DT_DATE)(SUBSTRING(DtWarrantStart,5,4) + "-" +
SUBSTRING(DtWarrantStart,3,2) + "-" + SUBSTRING(DtWarrantStart,1,2)),(DT__DATE)(SUBSTRING(DtWarrantEnd,5,4) + "-" + SUBSTRING(DtWarrantEnd,3,2) + "-" + SUBSTRING(DtWarrantEnd,1,2))) : -1) :-1) :0". The expression was not valid, or there is an out-of-memory
error.
Error at Load Inactive Cases [Compute Inactive Days [34]]: The expression "(DT_I4)DtWarrantStart > 0 ? ((DT_I4)DtWarrantEnd > 0 ? (DATEDIFF("DAY",(DT_DATE)(SUBSTRING(DtWarrantStart,5,4) + "-" + SUBSTRING(DtWarrantStart,3,2)
+ "-" + SUBSTRING(DtWarrantStart,1,2)),(DT_DATE)(SUBSTRING(DtWarrantEnd,5,4) + "-" + SUBSTRING(DtWarrantEnd,3,2) + "-" + SUBSTRING(DtWarrantEnd,1, 2))) > 0 ? DATEDIFF("DAY",(DT_DATE)(SUBSTRING(DtWarrantStart,5,4) + "-" + SUBSTRING(DtWarrantStart,3,2) +
"-" + SUBSTRING(DtWarrantStart,1,2)),(DT__DATE)(SUBSTRING(DtWarrantEnd,5,4) + "-" + SUBSTRING(DtWarrantEnd,3,2) + "-" + SUBSTRING(DtWarrantEnd,1,2))) : -1) :-1) :0" on "output column "Derived Column 1" (313)" is not valid.
Error at Load Inactive Cases [Compute Inactive Days [34]]: Failed to set property "Expression" on "output column "Derived Column 1" (313)".
ADDITIONAL INFORMATION:
Exception from HRESULT: 0xC0204006 (Microsoft.SqlServer.DTSPipelineWrap)
BUTTONS:
OK

Similar Messages

Maybe you are looking for

  • IMac DVD drive issues (May 2011 Thunderbolt models)?

    I'm going nuts. I picked this machine back up three hours ago from the Apple Store, where they replaced my Optiarc DVD drive on my 27" iMac with a new one (and also the cable). I'm having the same danged problem. So either there's a rash of bad Optia

  • User getting print output with logo and footer is cut

    Hi Experts, User is trying to print a PDF from Portal system and the print output comes with the logo cut at the top on the right handside and footer cut at the bottom Please can you let me know what could be the issue and how to investigate the issu

  • Diffrence between OBIEE 10g and 11g Architecture

    Hi Please help me by providing either the differences between the OBIEE 10g and 11g Architecture or a pointer/link. Thanks

  • Binary Search assumption

    Suppose the following instance of the binary search: BINARY-SEARCH(A,key,left,right) if left = right then return left else mid= (left + right)/2 if key < A[mid] then return BINARY-SEARCH(A,key,left,mid −1) else return BINARY-SEARCH(A,key,mid,right)As

  • Quantity Conversion Interface QCI

    Dear guys I m running a transaction MB03 which is not showing correct conversion unit sometimes. Having same material ,plant, temperature density and conversion group the two differrent posted documents shows different conversion unit some times. Can