473,396 Members | 2,092 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Determing a quarter in a financial year

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
Nov 21 '05 #1
3 2845
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

"RD" <no****@nospam.net>
..
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

Nov 21 '05 #2
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
"Cor Ligthert" <no************@planet.nl> wrote in message
news:em**************@TK2MSFTNGP12.phx.gbl...
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

"RD" <no****@nospam.net>
.
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


Nov 21 '05 #3
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

"RD" <no****@nospam.net>
...
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
"Cor Ligthert" <no************@planet.nl> wrote in message
news:em**************@TK2MSFTNGP12.phx.gbl...
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

"RD" <no****@nospam.net>
.
> 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
>
>



Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: John Bentley | last post by:
John Bentley writes at this level: If we think about our savings accounts then division never comes in (as far as I can see). We deposit and withdraw exact amounts most of the time. Occasionaly...
3
by: Matt | last post by:
Hello, I have a query that I would like to schedule in DTS. The criteria of this query checks for records in the table that are within the current quarter. Here is what I have. WHERE...
1
by: Terencetrent | last post by:
I have created a query that examines qarterly sales for 5 regions in the country. The query contains data for the past 6 quarters for each region and calculates the perecentage of total sales for...
8
by: Dominique Vandensteen | last post by:
I have a datetime and want to format it to "quarter year" so 20 december 2003 should give: "4-2003" is this possible? I don't find a format character for quarter :-( Dominique
2
by: JohnC | last post by:
This fantastic expression was posted by Duane Hookom. I have no idea how it works but it displays the fiscal year and quarter for FY starting on October 1. =Format$(DateAdd("q",1,),"\Qq...
1
by: mnoland | last post by:
I relay need some help I am looking to find every quarter between 2 dates here is an example of what i am trying to do data table client sbegin send 499 1-1-2000 6-1-2001...
2
by: rajukotla | last post by:
How to find out the number of days in a financial year. suppose from date is sep1st,2006.and to date is aug24th,2009. the entire range involves financial years.i.e., ...
4
by: gimme_this_gimme_that | last post by:
Is there a way to get the last day of the previous business quarter from DB2? For 10/21/2008 the day would be 9/30/2008. Thanks.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.