Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
SQL Server 2005 Integration Services
»
Convert datetime in SSIS
Convert datetime in SSIS
Rate Topic
Display Mode
Topic Options
Author
Message
leon.booij
leon.booij
Posted Thursday, March 07, 2013 5:40 AM
SSC Rookie
Group: General Forum Members
Last Login: Monday, May 13, 2013 3:06 AM
Points: 27,
Visits: 221
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
jamesl 88576
jamesl 88576
Posted Monday, March 11, 2013 2:49 PM
Forum Newbie
Group: General Forum Members
Last Login: Monday, May 13, 2013 1:04 PM
Points: 4,
Visits: 28
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
SQLRNNR
SQLRNNR
Posted Monday, March 11, 2013 2:52 PM
SSCoach
Group: General Forum Members
Last Login: Thursday, May 16, 2013 1:46 PM
Points: 18,732,
Visits: 12,329
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 2008
SQL RNNR
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 »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.