Click here to Skip to main content

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 19:46pm by ssd_coolguy.


Advertise | Privacy | Mobile
Web04 | 2.8.150301.1 | Last Updated 5 Nov 2009
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid