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
Posted Thursday, March 7, 2013 5:40 AM


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

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



Group: General Forum Members
Last Login: Today @ 9:02 AM
Points: 21,745, Visits: 15,438
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


Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1429484
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse