Click here to Skip to main content
13,195,379 members (67,078 online)

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.


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