Determing a quarter in a financial year

R

RD

Say Company's financial year starts October First and say we are now March
17th. How do you determine which quarter of the Financial year - not the
actual year - March 17th is in.

Thanks for any help,

Bob
 
C

Cor Ligthert

RD,

You mean something as this?
\\\
Dim theDate As DateTime = New DateTime(2005, 3, 17)
Dim quarter As Integer = (theDate.Month + 2) \ 3
If quarter = 4 Then
quarter = 1
Else
quarter += 1
End If
///

I hope this is something you wanted/

Cor
 
R

RD

Thanks Cor but I must be missing something.
Your bit of code does not seem to take into consideration that the first
quarter of the financial year starts on October First not January First , if
it does I do not see how? If it does would you mind explaining it to me?

Thanks
 
C

Cor Ligthert

RD,

Did you try it?
The 1st of October gives at me quarter = 1
The 1st of January gives at me quarter = 2
The 1st of April gives at me quarter = 3
The 1st of July gives at me quarter = 4

Where did I understood you wrong?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top