Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

First/Last Days in Current Quarter? 1

Status
Not open for further replies.

Yerdon

Programmer
Jul 29, 2002
62
0
0
US
Hi Everyone,

I am using
Code:
datename(quarter,getdate())
in order to find the current fiscal quarter.

Is there an easy way to get the first and last dates in the current quarter? For example, if today is 8/6/09, then the first date in the quarter would be 7/1/09 and the last date would be 10/31/09.

Any help would be really appreciated.

Thank you!

Joseph
 
try this:

Code:
Select DateAdd(Quarter, DateDiff(Quarter, 0, GetDate()), 0)
Select DateAdd(Quarter, 1 + DateDiff(Quarter, 0, GetDate()), -1)



-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Thank you! That works perfectly!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top