Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Convert datetime in SSIS Expand / Collapse
Author
Message
Posted Thursday, March 7, 2013 5:40 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, June 18, 2014 2:55 AM
Points: 179, Visits: 387
Hello i have a excel doc with the following data in in a column 31-JAN-13 15.04.51.590000000

how do i convert this in SSIS into a datetime column?

I got this error message
The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.". "

Post #1427912
Posted Monday, March 11, 2013 2:49 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, September 11, 2014 9:56 AM
Points: 4, Visits: 86
A solution I have used in the past is adding in two Derived columns one right after the other. In the first pick apart your date in to a Year derived column and subsequently a Month and Day also using the date/time functions. Then in the next Derived Column reassemble the parts you need. This will probably work with the time also but with what I saw in your post it may be a little more difficult.
Post #1429482
Posted Monday, March 11, 2013 2:52 PM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 10:17 PM
Points: 17,815, Visits: 15,744
I have done similar with the derived columns. That is what I would recommend.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Post #1429484
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse