Monday, March 30, 2009

Date functions in SSIS

This comes in the sequence of trying to use date functions in SSIS in relation to T-SQL.

There are some differences in using one or another that might cause some difficulties if we are not aware of them.

For example you should remember your systems default date sequence if it is day-month-year, month-day-year, year-month-day or year-day-month. This is important when using dates in calculations with another dates.

GETDATE() - returns today's date

DATEADD - adds a specific value to the referenced date

example: DATEADD(week,2,getdate()) - adds two weeks to current date


A very simple link to refer where is this one from Microsoft:

http://msdn.microsoft.com/en-us/library/aa258863(SQL.80).aspx


Obs: for a list of all SSIS available command please refer to:

http://msdn.microsoft.com/en-us/library/ms141671.aspx

No comments: