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.
| Author |
Topic |
|
citiinvestor
Starting Member
1 Post |
Posted - 2009-09-19 : 19:50:26
|
| This is my SSIS exercise I have a DATETIME column, what I want is to get the Month and Year from " DATETIME " column and load it into a new column called “Month_Year” and then get day from the same " DATETIME " and load it into a new column called "day"Visually1. Source Column: DATETIME2. Destination Column: Month_Year DayBottom line is I need to break DATETIME into two column Month_Year and Day. |
|
|
YellowBug
Aged Yak Warrior
616 Posts |
Posted - 2009-09-20 : 07:07:32
|
| You can try this in the Derived Column Transformation Editor ExpressionMonth_Year: (DT_STR,2,1252)DATEPART("mm",GETDATE()) + (DT_STR,4,1252)DATEPART("yyyy",GETDATE())Day: (DT_STR,2,1252)DATEPART("dd",GETDATE()) |
 |
|
|
|
|
|