How to get End of the Month in SQL SERVER still the popular question always. To find the last day of each month it is a similar question. I excited to answering it as the following.
To to get End of the Month in SQL SERVER I always use the EOMONTH to Calculate the End of the Month as the following script:
DECLARE @date date
SET @date = '2017-08-31'
SELECT EOMONTH ( @date ) AS LAST_DATE_AUG
When you excecute it and it's should show as following screen result.
- Blogger Comment
- Facebook Comment
Subscribe to:
Post Comments
(
Atom
)
0 comments:
Post a Comment