Click here to Skip to main content
13,449,155 members (49,500 online)

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

Revision 2
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 |
Web03-2016 | 2.8.180318.3 | Last Updated 5 Nov 2009
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid