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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Financial Quarter 1

Status
Not open for further replies.

MikeAuz1979

Programmer
Aug 28, 2006
80
AU
Hi,

I'm trying to return the financial quarter of a date rather than the calendar quarter. The financial year being 1 July - 30 Jun

For example something like FinQuarter(1 July 06) returns 1

Thanks for any help!
 
How about:

[tt]IIf(Format(dteDate, "q") < 3, Format(dteDate, "q") + 2, Format(dteDate, "q") - 2)[/tt]

Where dteDate = mm/dd/yyyy

 
Hi -

There are many instances when a fiscal year does not start on 1 Jan. Try the following which allows the user to specify the FY start date.
Code:
Function fGetFYQtr(FYStart As Date, pDate As Date) As Integer          
   'To call: from debug (immediate) window 
   '? fGetFYQtr(#7/1/06#, #10/1/06#) 
   'returns: 2 
   fGetFYQtr = DateDiff("m", FYStart, pDate) \ 3 + 1 
End Function

HTH - Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top