Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Substring Date

Author  Topic 

Brittney10
Posting Yak Master

154 Posts

Posted - 2012-07-04 : 19:09:56
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

52326 Posts

Posted - 2012-07-04 : 19:20:50
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

154 Posts

Posted - 2012-07-04 : 19:42:37
Works perfect. Thanks!!!
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-07-04 : 20:01:18
welcome

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

Go to Top of Page
   

- Advertisement -