473,503 Members | 1,629 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

dates and currency

I have a table and a form. I have a weekly cost field and a monthly
cost field and a
projected total field. I have got the monthly cost field to add up the
weekly cost field and now would like the projected total field to add
up the monthly cost field between 2 date fields, the effective start
date and the end date.

Don't know where to start

HELP!

Elaine

Aug 8 '06 #1
2 1163
Hi Elainie,

It strikes me that you want a totals query that will have critera on
the date.

The sql would look something like this.

SELECT Sum(MonthyCost) AS Total
FROM tblCosts
WHERE ExpenseDate [StartDate] and ExpenseDate < [EndDate]

Good luck

Nick
Elainie wrote:
I have a table and a form. I have a weekly cost field and a monthly
cost field and a
projected total field. I have got the monthly cost field to add up the
weekly cost field and now would like the projected total field to add
up the monthly cost field between 2 date fields, the effective start
date and the end date.

Don't know where to start

HELP!

Elaine
Aug 8 '06 #2
So your Monthly Cost field knows which weeks are attributed to your
month? Are you doing this based on dates? Where are the dates stored?
Is your table flat, or do you have multiple relational tables? If
you're not doing this based on dates, are you multiplying the Weekly
Cost field by 4 to assume a Monthly Cost?

I'd say you can enter a start date and end date, use the Week()
function to find out which week number it is (between 1 and 52) and
then subtract it from the end date, but that's not going to work if
your project spans from, say, December 10th to January 20th. You're
probably going to have to do a DateDiff to find out how many days are
between your start and end dates, and then divide that by 7 to get the
number of weeks, and then multiply that by your weekly cost.

Elainie wrote:
I have a table and a form. I have a weekly cost field and a monthly
cost field and a
projected total field. I have got the monthly cost field to add up the
weekly cost field and now would like the projected total field to add
up the monthly cost field between 2 date fields, the effective start
date and the end date.

Don't know where to start

HELP!

Elaine
Aug 8 '06 #3

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

Similar topics

9
2745
by: Thomas W | last post by:
I'm developing a web-application where the user sometimes has to enter dates in plain text, allthough a format may be provided to give clues. On the server side this piece of text has to be parsed...
2
574
by: Willing 2 Learn | last post by:
I'm still having trouble getting my program to do arithmetic in cents(keeping all #'s) then convert the answer in a format of dollars & cents. The main program should add, subtract, scalar...
1
1481
by: Michael | last post by:
Hi everyone. Thanks again in advance for any help I can get. I am running a function that runs a query and exports it to excel using DoCmd.TransferSpreadsheet acExport,...
3
2482
by: thechaosengine | last post by:
Hi all, I'm having trouble getting dates to display in the right format in my GridView. I'd like it to appear in the UK format - just the date, not the time, but I'm not having any luck. ...
6
1511
by: thechaosengine | last post by:
Hi guys, I'm developing a web app on a UK computer. When I put a date into a textbox, its in the format DD/MM/YY. The DateTime object takes that in and handles in perfectly. Now, I need to...
8
294
by: Phil Stanton | last post by:
I am being thick. I have a table of employees - EmpID & EmpName I have a table or wage rates for each employee - RateID, EmpID, WageRate RateFron (Date) I have a table of payments - PayID,...
16
9465
by: xjohnx | last post by:
Hi, I'm hoping someone can help me I am quite new to Javascript and have had to create a programme which converts dollars into euros and vice versa, here is my script which is working var...
4
1492
lee123
by: lee123 | last post by:
hi there it's been awhile since i have been on this forum but anyway how do you calculate dates in a query so that there are in currency for example: if a person rents a room from 01/01/07 to...
1
2318
by: Malcolm Greene | last post by:
The locale module provides the ability to format dates, currency and numbers according to a specific locale. Is there a corresponding module for parsing locale's output to convert locale...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7328
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...
1
6991
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
5578
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,...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.