dbTalk Databases Forums  

Sql 2005: SSIS - How to convert a crazy string to a date

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Sql 2005: SSIS - How to convert a crazy string to a date in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ealmquist@gmail.com
 
Posts: n/a

Default Sql 2005: SSIS - How to convert a crazy string to a date - 01-12-2006 , 04:38 PM






I'm trying to fix some errors in a SSIS package that occured after
migrating from a SQL 2000 DTS package. I've been fairly successful so
far, but I'm failing miserably on a data conversion. How can I convert
a string formatted as

Jan 11 2006 12:00:00:000AM

to a smalldatetime?

Any help would be greatly appreciated!

-Erik


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Sql 2005: SSIS - How to convert a crazy string to a date - 01-14-2006 , 07:38 AM






Hello ealmquist (AT) gmail (DOT) com,


What have you tried so far?

What errors do you receive if any or do you just receive the wrong dates?

One obvious way to do this is to use a Script component

What is the source?

You could also use a derived column and Kirk has some simple examples that
you could extend

http://www.sqljunkies.com/WebLog/kni.../14/16073.aspx

Allan



Quote:
I'm trying to fix some errors in a SSIS package that occured after
migrating from a SQL 2000 DTS package. I've been fairly successful so
far, but I'm failing miserably on a data conversion. How can I
convert a string formatted as

Jan 11 2006 12:00:00:000AM

to a smalldatetime?

Any help would be greatly appreciated!

-Erik




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.