Here is the link to integration services data types
http://msdn.microsoft.com/en-us/library/ms141036.aspx
Expressions in SSIS:
To convert today’s date (getdate()) to string (Format: 2008-05-07)
SUBSTRING((DT_STR, 30, 1252)GETDATE(), 1, 10 )
To convert today’s date (getdate()) to string (format: 20080507)
( (DT_STR, 4, 1252) Year(GETDATE() )+RIGHT("0" + (DT_STR, 2, 1252) MONTH( GETDATE() ), 2) +RIGHT("0" + (DT_STR, 2, 1252) Day(GETDATE() ), 2) )
To convert today’s date (getdate()) to int (Format: 20080507)
(DT_I4) ( (DT_STR, 4, 1252) Year(GETDATE() )+RIGHT("0" + (DT_STR, 2, 1252) MONTH( GETDATE() ), 2) +RIGHT("0" + (DT_STR, 2, 1252) Day(GETDATE() ), 2) )
No comments:
Post a Comment