How To Show All the days in a scpecific month

Lee Chai Ling

Registered User.
Local time
Today, 00:22
Joined
Sep 29, 2004
Messages
15
Hi!

I want to show all the days in the specific month, e.g. there are 29 days in february 2008 and the records will display all the days that are available as below:
1/2/08
2/2/08
3/2/08
..
..
..
29/2/08

What is the syntax?

Thank you.
 
I just want to create a query that will automatic show all the days that are available during the specific month. Let say,if i key in february 2008, then the query will shows all the available days, i.e from 1/2/2008 to 29/2/2008. Is it possible?

Thank you.
 
You might put in something like this :

SELECT DatePart("m",[Yourfield]) AS Expr1
FROM Yourtable
WHERE (((DatePart("m",[Yourfield])) Like 2));

This will give you all records for February.
Change like 2 to like 3 will give you March values, etc.

Hth
 
I just want to create a query that will automatic show all the days that are available during the specific month. Let say,if i key in february 2008, then the query will shows all the available days, i.e from 1/2/2008 to 29/2/2008. Is it possible?

Thank you.
Of course it's possible! I've done some pretty impossible things with this program, and this is not one of them. ;)

You might have to call a function to do this. You won't have to go that far if you are willing to change the input values (in the SQL window) everytime you want to run the query. Otherwise, if you want to type in your inputs in, say, a pop-up window, like the one you get with a parameter query, you're not going to be able to...

Is this the way you want to do it?
 
Of course it's possible! I've done some pretty impossible things with this program, and this is not one of them. ;)

You might have to call a function to do this. You won't have to go that far if you are willing to change the input values (in the SQL window) everytime you want to run the query. Otherwise, if you want to type in your inputs in, say, a pop-up window, like the one you get with a parameter query, you're not going to be able to...

Is this the way you want to do it?


ajetrumpet,

Yes,as long as i can get the answer that i want. Can you show the method to me? I want to generate a yearly report which shows the attendance of the sundry workers during a whole year. The report format is looks like below:

Month - Jan , Feb , Mar, Apr , May, Jun, Jul, Aug, Sep, Oct, Nov, Dec
1 - Y
2 - Y
3 - N
4 - S
5
6
7
8
9
10
.
.
.
.
31


Remark : Y= working day
N= absent
S= rest day (sunday)

I will key in thier attendance daily if they come to work, else they are considered absent (without key in anything.) The system will auto calculate the rest day for each month which is considered rest day.

Any ideas to create such report??

Thank you.
 
Last edited:
First of all, if that's the outlay of the table you are working with, it's not normalized. That needs changed in order to make your life a heck of a lot easier!

Second, is that format representative of the table? Or does the structure of the table laid out differently? You say it's a "report", so we need to know if that's what you want to see in the end, or if that is what you are working with now...
 

Users who are viewing this thread

Back
Top Bottom