In this article, I found a sql query to find first, last and total days in a month from the current or any date using inbuilt functions such as DATEADD(),DATEDIFF() and DAYS() functions. Here i am using current date. If you want to get any date then replace your date with GETDATE()