Show query per day by specific month

J

joave

Hi all:

I have some data that I need to show. The query asks the user what month
and year the data is to show. I need the query to divide the total for the
month by the number of days in the month. How do I get the query to know how
many days per month and show the proper data (per day)?

Thank you in advance,

Dave
 
J

John W. Vinson

Hi all:

I have some data that I need to show. The query asks the user what month
and year the data is to show. I need the query to divide the total for the
month by the number of days in the month. How do I get the query to know how
many days per month and show the proper data (per day)?

Thank you in advance,

Dave

The length of a month can be obtained using:

LengthOfMonth: Day(DateSerial([Enter year:], [Enter month:] + 1, 0))

You can use that expression in the denominator of an expression in your query.
 
M

MGFoster

joave said:
Hi all:

I have some data that I need to show. The query asks the user what month
and year the data is to show. I need the query to divide the total for the
month by the number of days in the month. How do I get the query to know how
many days per month and show the proper data (per day)?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Have 2 parmaeters: [Enter Year] and [Enter Month]. Use the following
formula to get the days in month:

Day(DateSerial(Year([Enter Year]), Month([Enter Month])+1, 0))

HTH,
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBSePVVoechKqOuFEgEQJxXACeNzaj5JvuKN7Jqa35OeGp1WHuRYYAoPav
K8ujqxHPhwNRjiVO0+2k8Ueq
=AlYK
-----END PGP SIGNATURE-----
 

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