In
this article I am going to explain how to find (get) the Last day of Previous,
Current and Next month in Sql server
In
the previous article I have explained How to display Microsoft Chart data valueon mouse (cursor) hover (tooltip) in asp.net and Simple steps to display datapoint labels outside a pie Chart in asp.net.
Implementation:
Use/write
the below given quires to get the last day.
Find
the last day of previous month:
select CONVERT(varchar,dateadd(d,-(day(getdate())),getdate()),106)'Last Day of Previous Month'
Find
the last day of current month:
select CONVERT(varchar,dateadd(d,-(day(dateadd(m,1,getdate()))),dateadd(m,1,getdate())),106)'Last Day of Current Month'
Find
the last day of next month:
select CONVERT(varchar,dateadd(d,-