![Share on Facebook Facebook](https://www.sqlserver.info/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/facebook.png)
![Share on Twitter twitter](https://www.sqlserver.info/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/twitter.png)
![Share on Reddit reddit](https://www.sqlserver.info/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/reddit.png)
![Pin it with Pinterest pinterest](https://www.sqlserver.info/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/pinterest.png)
![Share on Linkedin linkedin](https://www.sqlserver.info/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/linkedin.png)
![Share by email mail](https://www.sqlserver.info/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/mail.png)
One question that we get a lot is how to get the quarter from a date. SQL Server has a very easy way to get the quarter from a date (since SQL 2005) using the DATEPART command.
To get the quarter from the current date
SELECT DATEPART(quarter, GETDATE()) AS Quarter_From_Date
To get the quarter from a different date
DECLARE @DateToCheck DATETIME SET @DateToCheck = '7/1/2014' SELECT DATEPART(quarter, @DateToCheck) AS Quarter_From_Date