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.

 All Forums
 SQL Server 2012 Forums
 SSIS and Import/Export (2012)
 Derived Column Last Day

Author  Topic 

Johnph
Posting Yak Master

103 Posts

Posted - 2015-02-09 : 16:05:13
Hello,

I need some help getting the last day of the previous month. I currently have DATEADD("mm",-1,GETDATE()) to obtain last month, but I am having a hard time getting the last day.

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2015-02-09 : 16:30:58
Lots of examples here:

http://www.databasejournal.com/features/mssql/article.php/3076421/Examples-of-how-to-Calculate-Different-SQL-Server-Dates.htm
Go to Top of Page
   

- Advertisement -