Number of days left in a given month How do I find the number of days left in the current month? Example if current month is November and todays date is 16/11/2016 The Numb
--For SQL 2012 And Above Version Use Below Query to Get Count Of Days Left In A Month
DECLARE @date DATE
SET @date=GETDATE()
SELECT DATEDIFF(DAY, @date,EOMONTH(@date))
-- And for Sql Server 2008 Use Below Query to Get Count of Days Left for the Month
DECLARE @date Date
SET @date=GETDATE()
SELECT DATEDIFF(DAY, @date, DATEADD(MONTH, 1, @date)) - DATENAME(DAY,GETDATE())
AS DaysLeft