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

  • Why is my iMac no longer recognizing Memorex CD-R and DVD-R media that it burned previously?

    So this has happened before to me with other computers and other drives, I've had burners refuse to recognize some brands of blank discs before, but I've never really figured out the issue or had a drive start to refuse to recognize a specific brand

  • How do I Save As... in Pages

    The Help says to Choose File > Choose Save As and rename the document... well if there was a Save As in the list, I would not be posting this. How do I get past this improvement?

  • Outbound IDOC for customer master

    Hi I want to configure that as soon as I create a customer master using the transaction XD01 it should generate an outbound IDOC. Can anyone tell me how to configure this and what need to be br configured. Thanx in advance regards Vinod

  • Creating PDF/A fails

    Hi guys, I've scanned a couple of documents, set my metadata and now I want to make the document a PDF/A. I go into Preflight, select "Convert to PDF/A-1a (sRGB)" and execute it on my PDFs, but almost all of them fail with errors similar to this: <hi

  • Compile question

    I got a few questions regarding compiling with Sun Studio. 1) If I compile a application for a specific CPU architecture, how specific can I be, specify exact CPU or just CPU family or perhaps both? 2) If I choose to compile for a specific CPU, could