Click here to Skip to main content
12,689,349 members (26,491 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

15.6K views
5 bookmarked
Posted

SQL Get the last date of the month

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

License

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

Share

About the Author

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

You may also be interested in...

Pro
Pro

Comments and Discussions

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