dario.quinn
Old Hand
Points: 304
More actions
March 21, 2013 at 5:55 am
#275411
Just now I have a date column with format of 2011-05-25 I would like to split this into three columns:
Year Month Day
2011 05 25
Can this be done using SSIS ? or even in SQL OLE DB?
Phil Parkin
SSC Guru
Points: 247180
March 21, 2013 at 6:37 am
#1599348
Check out the T-SQL Year(), Month() and Day() functions - you can do this at source.
Koen Verbeeck
Points: 259197
March 21, 2013 at 2:48 pm
#1599590
dario.quinn (3/21/2013)Just now I have a date column with format of 2011-05-25 I would like to split this into three columns:Year Month Day2011 05 25 Can this be done using SSIS ? or even in SQL OLE DB?
dario.quinn (3/21/2013)
TSQL is the easiest option, but if you're feeling adventurous you can also do it in a derived column using similar functions.
Need an answer? No, you need a questionMy blog at https://sqlkover.com.MCSE Business Intelligence - Microsoft Data Platform MVP
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply