Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / database / SQL-Server

Get days of a month in SQL

2.00/5 (1 vote)
3 Feb 2010CPOL 8.5K  
select days_of_month=day(dateadd(mm,-1,'12-feb-2010'),-1) :laugh:
SQL
select days_of_month=day(dateadd(mm,-1,'12-feb-2010'),-1)
:laugh:

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)