last day of last month date expression in ssis

Viewed 9694

I have to create a derived column to upload a date in OLEDB destination because my source file doesn't contain this date. The date i want to get through derived column is last day of last month. Does anyone know how to get it?

2 Answers

The simplest way if you don't need time is :

(DT_DBDATE)(DATEADD("d",-DAY(GETDATE()),GETDATE()))
Related