Retrieve "day of Quarter" using DTS ot T-SQL ?

  •  

    Hi :

    I am trying to retrive the number of day in a quarter based on date using T-SQL or DTS. For example: today is 07/15/2004.  I would like to retrive in "day_of_calendar_quarter" value 15. Since I am on 15th day of Quarter 3.

    If today is 08/15/2004, the I would like to retrive value 46, since 08/15/2004 is the 46th day of Quarter 3.

    I am trying to use DATPART function. I can get "day of week", "day of month" and "day of year" by using DATEPART(w,getdate()), DATEPART(d,getdate()), and DATEPART(dy,getdate()) respectively. HOw do I get the similar day for quarter ?

    Thanks for your help. 

  • See:

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=126525


    You must unlearn what You have learnt

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply