DTS transforming text to datetime format
-
My source is a delimited text file containing a date in the form of yyyymmdd. I would like to use the transformation in DTS to convert the data to a datetime column in my destination table. I have been using the import wizard and cannot seem to figure out how to do this. All help is greatly appreciated.
-
My source is a delimited text file containing a date in the form of yyyymmdd. I would like to use the transformation in DTS to convert the data to a datetime column in my destination table. I have been using the import wizard and cannot seem to figure out how to do this. All help is greatly appreciated.
You should be able to implicitly convert text in that format to a datetime. Just stuff the data into a datetime column, and the the SQL Server handle the conversion automatically.
Grim
(aka Toby)
MCDBA, MCSD, MCP+SB
SELECT * FROM user WHERE clue IS NOT NULL GO
(0 row(s) affected)
-
You should be able to implicitly convert text in that format to a datetime. Just stuff the data into a datetime column, and the the SQL Server handle the conversion automatically.
Grim
(aka Toby)
MCDBA, MCSD, MCP+SB
SELECT * FROM user WHERE clue IS NOT NULL GO
(0 row(s) affected)
-
When I try to let SQL server handle the conversion I receive this error: ActiveX Scripting Transform "AxScriptXform' encountered an invalid data value for 'EmpAnnvDate' destination column.
-
Have you verified that all of your records contain valid dates in that format?
Grim
(aka Toby)
MCDBA, MCSD, MCP+SB
SELECT * FROM user WHERE clue IS NOT NULL GO
(0 row(s) affected)