Time attendance database and coding
I am really stuck today and can use all your help on this subject.
I am making kinda like a punch-in card for work which will register your time of arrive and departure. I have a small system working in that the employee has an ID number and then when they log in with the EmployeeID and Password the database records the date and the time of arrival, then when they log out it records the exit time and then works out the amount of hours and minutes worked today.
However the problem arises when I want to call up a complete week or month. Our company doesn't work on a Sunday. For example if I call up the weeks information and it happens to be wednesday. I want it display the next 3 days (Thurs, Fri and Saturday) which will be empty cos they are in the future and the first 4 days (Sun, Mon, tue and wed). What I want to know is how can I extract this data. My TABLE consists of the following fields: EmployeeID, Date, TimeIn, TimeOut, HoursWorked, MinutesWorked.
I have been thinking about using the day indentifier which gives you a numeric for that day(eg. sun=0, mon=1 etc) but what happens when tuesday falls on the first of the month.
Are there any simpler ways to resolve this problem. Any ideas or feedback will be greatly recieved.
With many thanks for all your assistance and time,