import_failure

  • Hi

    I am importing a text file into my sqlserver table.In the text file the date foramt is given as 050203.The import was failed when i try to import this into a column of datetime data type.what should i do to import this data into my sql server table?

    Thanks

  • Hi,

    How about setting the colum type for this column as something like varchar(20) during import and then using the convert(datetime) function to convert this varchar value into a datetime value...

    -- whoops...the convert datetime for a value like 050203 will convert it to '2005-02-03'...I assume that you need it to be converted to something like '2003-05-02'...I don't know if there is a specific datetime format for converting a "mmddyy" or "ddmmyy" input format...

    Edited by - winash on 05/02/2003 1:33:04 PM

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply