Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

How to find Number of Days in Sql Server?

try below code:-SELECT DATEPART(day, DATEADD(s,-1,DATEADD(mm,DATEDIFF(m,0,'2011-02-25')+1,0)))

Statistics


License

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

About the Author

ssd_coolguy
Software Developer
India India
No Biography provided

| Advertise | Privacy | Mobile
Web03 | 2.8.140709.1 | Last Updated 29 Dec 2012
Article Copyright 2012 by ssd_coolguy
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid