Weekday

  • Thread starter Gaetanm via AccessMonster.com
  • Start date
G

Gaetanm via AccessMonster.com

I have a text box in a form that shows the time worked for this week.
The problem I'm having it retains the data from the previous friday to the
next friday. The start of the week is Sunday, ends Saturday and
it doe's not go beyound midnight. Belloow is the SQL query that I use
I can't see what I'm doing wrong

SELECT Clock_Table.EmployeeID AS Expr1, Clock_Table.StartDate AS Expr2,
Clock_Table.StopDate AS Expr3, DateDiff("n",[Startdate],[Stopdate])\60 &
Format(DateDiff("n",[Startdate],[Stopdate]) Mod 60,"\:00") AS ToTalTime,
DateDiff("n",[Startdate],[Stopdate]) AS TotalHoursMinutes, Round(
[TotalHoursMinutes]/60,2) AS HundredTime
FROM Clock_Table
WHERE (((Clock_Table.EmployeeID)=[Forms]![frmClock_Start_Table]!
[cboEmployeeId]) AND ((Clock_Table.StopDate)>Date()-Weekday(Date()+1))) OR ((
(Clock_Table.EmployeeID)=[Forms]![frmClock_Stop_Table]![cboEmployeeId]));


Help Please

Gaetanm
 

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

Similar Threads


Top