none
Data Type Conversions RRS feed

  • Question

  • I am trying to convert int to date. first I have converted the int value to string(dt_str), using 'Data Conversion' Transformation, then again I have used another 'Data Conversion' Transformation to convert it into date. but its giving the following error   

    [Data Conversion 1 [3643]] Error: Data conversion failed while converting column "THEDATE_INTO_STR" (2799) to column "CALENDAR_YEAR1" (3657).  The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.".


    What are the simple ways to convert from one data type to another? If somebody could give some example of the above...............
    Thursday, November 3, 2005 7:02 AM

Answers

  • Try using the Derived Column component to do the casting. Its more flexible than Data Conversion component.

    -Jamie
    Thursday, November 3, 2005 11:35 AM
    Moderator

All replies

  • Try using the Derived Column component to do the casting. Its more flexible than Data Conversion component.

    -Jamie
    Thursday, November 3, 2005 11:35 AM
    Moderator
  • Right, you might need the flexibility of expressions in derived column.
    What is the meaning of the integer as a date?
    Friday, November 4, 2005 9:13 AM
  • int as a date means---I have one int type in source, which has data like---20051211....
    but my target column is of datetime.


    Anyways, it done now...

    Thanks
    Thursday, November 10, 2005 10:07 AM