Ben Hamilton

Sql snippet to show just opportunities from current month

I’m needing to do a sql query to show just the opportunities from the current month, the sql snippet for the WHERE clause to do this is the following:

WHERE MONTH(opportunities.date_closed) = MONTH(NOW()) and YEAR(opportunities.date_closed) = Year(now())

This entry was posted in SQL and tagged , , . Bookmark the permalink. Follow any comments here with the RSS feed for this post. Both comments and trackbacks are currently closed.