none
Data type Conversion problem in ssis RRS feed

  • Question

  • I m having data type conversion problem. i m importing data from flat file to sqlserver database and getting problem on coversion of datetime from .csv to sqldatatype

    i have date like this  "5/21/2011 5:01:55 AM" I have used date,dbdate  and all which is present in dataconversion is there any other method.

     pls help


    Thursday, May 26, 2011 9:01 AM

Answers

All replies

  • 1) You could also type cast to required type in derived transformation and create a derived column.
    Happy to help! Thanks. Regards and good Wishes, Deepak.
    Thursday, May 26, 2011 9:03 AM
  • U r right but cannot convert fron source side

    Thursday, May 26, 2011 9:06 AM
  • Can you right clcik the flat file source in the data flow and check the Advanced properties. ("Show advanced editor), IN the INput and output columns tab you could be able to change the data type from the source.


    Happy to help! Thanks. Regards and good Wishes, Deepak.
    Thursday, May 26, 2011 9:23 AM
  • Do you get any errors when you try to convert the data?

    Is the locale correct? E.g. should it be 21/5/2011 instead 5/21/2011?


    MCTS, MCITP - Please mark posts as answered where appropriate.
    Thursday, May 26, 2011 12:31 PM
  • You need to convert that string format to a valid date, and have to reformat the string in order to perform an unambiguous conversion.  Read Converting Strings to Dates in the Derived Column Transform - it should help out.
    Todd McDermid's Blog Talk to me now on
    Thursday, May 26, 2011 8:58 PM
    Moderator