Click here to Skip to main content
13,504,941 members

Response to: How to find Number of Days in Sql Server?

Revision 1
try below code:-

SELECT DATEPART(day, DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,'2011-02-25')+1,0)))
Posted 28-Dec-12 18:46pm by ssd_coolguy.
  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.180417.1 | Last Updated 5 Nov 2009
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid