Click here to Skip to main content
Click here to Skip to main content
Alternative Tip

SQL Get the last date of the month

By , 17 Nov 2009
Rate this:
Please Sign up or sign in to vote.
declare @Date datetime
set @Date = '2009/10/17'
Select dateadd(day, 0 - day(dateadd(month, 1 , @Date)), dateadd(month, 1 , @Date))


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Asif Mushtaq
Software Developer (Senior)
Pakistan Pakistan
No Biography provided

Comments and Discussions

-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web02 | 2.8.140415.2 | Last Updated 18 Nov 2009
Article Copyright 2009 by Asif Mushtaq
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid