How to get the number of quarter from given date?

 Posted by Lakhangarg on 2/22/2010 | Category: Sql Server Interview questions | Views: 4527
Answer:

There is one method to get the Quarter number from given date:
DECLARE @GivenDate datetime
SET @GivenDate='2010-02-22 23:06:38.300'

SELECT DatePart(Q,GETDATE())
Output: 1


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response