dbTalk Databases Forums  

Converting Flat File Source dates

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


Discuss Converting Flat File Source dates in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dave Booker
 
Posts: n/a

Default Converting Flat File Source dates - 07-28-2006 , 02:51 PM






I'm using an "Integration Services Project" / .dtsx package to load CSVs into
my SQL Server 2005. Many files represent dates as "YYYYMMDD", and I want to
convert those to feed a SQL "smalldatetime" column. How do I do that?

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

Default Re: Converting Flat File Source dates - 07-29-2006 , 03:42 AM






Hello Dave,

You could use a Script transform to do the conversion (DateTime.ParseExact)

or you could simply us a derived column.

Have a read of this about others who are doing the same thing

http://forums.microsoft.com/MSDN/Sho...74927&SiteID=1


Allan

Quote:
I'm using an "Integration Services Project" / .dtsx package to load
CSVs into my SQL Server 2005. Many files represent dates as
"YYYYMMDD", and I want to convert those to feed a SQL "smalldatetime"
column. How do I do that?




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.