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.