Click here to Skip to main content
11,486,673 members (71,757 online)
Click here to Skip to main content

How to find Number of Days in Sql Server?

, 28 Dec 2012 CPOL 1
Rate this:
Please Sign up or sign in to vote.
try below code:-SELECT DATEPART(day, DATEADD(s,-1,DATEADD(mm,DATEDIFF(m,0,'2011-02-25')+1,0)))
try below code:-

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

License

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

Share

About the Author

ssd_coolguy
Software Developer
India India
No Biography provided

Comments and Discussions

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