SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Substring Date
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Brittney10
Posting Yak Master

USA
128 Posts

Posted - 07/04/2012 :  19:09:56  Show Profile  Reply with Quote
I'm receiving a string column that is in the following format: 201202.06. I need to be able to take that string and format it to look like MM/YY. Any help is appreciated!

visakh16
Very Important crosS Applying yaK Herder

India
47099 Posts

Posted - 07/04/2012 :  19:20:50  Show Profile  Reply with Quote
use a derived column transformation and inside it use a expression like SUBSTRING(DateField,5,2) + "/" + SUBSTRING(DateField,3,2)

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Brittney10
Posting Yak Master

USA
128 Posts

Posted - 07/04/2012 :  19:42:37  Show Profile  Reply with Quote
Works perfect. Thanks!!!
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
47099 Posts

Posted - 07/04/2012 :  20:01:18  Show Profile  Reply with Quote
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000