473,395 Members | 1,774 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,395 software developers and data experts.

Monthly/Quarterly Returns: Expressing Date?

A "quarterly return" is the decimal amount that an investment returned
over a given three-month period.

The periods end on Mar, Jun, Sep, Dec

Seems like there are a couple of ways to link a return with a quarter:

1) Year and quarter number. e.g. 2003-02 would be the second
quarter of 2003.

2) A date. Quarter 2 of 2003 could be represented by either
06/31/2003 or 06/01/2003 - with the understanding that what either
date really means is the entire quarter ending 6/31.

Right now, I'm partial to option B of #2. Using the first day in
the month gets around different number of days in months.

Arithmetic seems simpler now that we can just do a DateAdd("m", Date1,
Date2).
But it's not a true representation - wheras

2002 01
2002 02
2002 03
2002 04 for quarters

and the same thing, but with 01-12 for months is.
Anybody been down this road before?
If so, will I live to regret approach #2?
Nov 13 '05 #1
1 2321
> A "quarterly return" is the decimal amount that an investment returned
over a given three-month period.

The periods end on Mar, Jun, Sep, Dec

Seems like there are a couple of ways to link a return with a quarter:

1) Year and quarter number. e.g. 2003-02 would be the second
quarter of 2003.

2) A date. Quarter 2 of 2003 could be represented by either
06/31/2003 or 06/01/2003 - with the understanding that what either
date really means is the entire quarter ending 6/31.

Right now, I'm partial to option B of #2. Using the first day in
the month gets around different number of days in months.

Arithmetic seems simpler now that we can just do a DateAdd("m", Date1,
Date2).
But it's not a true representation - wheras

2002 01
2002 02
2002 03
2002 04 for quarters

and the same thing, but with 01-12 for months is.
Anybody been down this road before?
If so, will I live to regret approach #2?


I did something like that before and Datepart("q" ) seemed to work fine.

SELECT SUM([Amount]) AS Q3Total, [TxAcct_ID]
FROM tblTxJournal
WHERE (DatePart("q",[TxDate])=3 AND Year([TxDate])=QryPrm("frm3",
"cbx3Year")) AND ([TxType_ID]=QryPrm("frm3", "cbx3TxType") OR QryPrm("frm3",
"cbx3TxType")=0)
GROUP BY [TxAcct_ID];
Nov 13 '05 #2

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

Similar topics

18
by: Jeremy Weiss | last post by:
I'm trying to build a database that will handle the monthly billing needs of a small company. I'm charting everything out and here's what I see: table for customers sub table to track payments...
0
by: tcread | last post by:
OBJECTIVE I'd like to be able to query the cumulative monthly returns of a given stock based on the daily returns. I need to do this for 1000 securities over 5 years (60 months) TABLES...
2
by: karmaverma | last post by:
I need help with this apparently simple problem. I have a table with the following records: Effective_Date Commodity Price 10/1/2005 0 5/1/2006 2750 10/1/2006 ...
3
by: cameron | last post by:
Hi I am new here in this forum: I am writing a C++ program to calculate a Montly Mortgage Payment where the loan amount is 200,000.00 with a 5.75% interest rate with a term of 30 years. My program...
1
by: Paul H | last post by:
Can anyone give me some pointers as to how to construct a form or forms that will allow me to see a schedule of meeting rooms Booked or Available as a nice visual display. The Query that holds the...
1
by: azimid | last post by:
Hello everyone, I need your help with a query. Currently I display the data in a daily format. I have a form that the users submits the date range (from say 20061224 to 20070530) and the...
7
by: Lucas_london via AccessMonster.com | last post by:
Hi I have set up a database/tables in Access based on daily timeseries data. However I would like to create two additional columns in the table as a basis to pull the data on a weekly and...
1
by: egrill | last post by:
I can access the date field from OBCC tables and do the normal date range for a quarterly report for each quarter I need the formula so I can sort the records into individual quarter having them...
5
by: sparkbrook | last post by:
I'm trying to write a simple Access program that stores details of customers that have service contracts, payable monthly or quarterly (customer's choice). The program needs to print monthly or...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.