Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get week ending date 1

Status
Not open for further replies.

Apollo13a

Technical User
Apr 27, 2003
277
US
Hello, I have a query that daily labor hours and with dates for each day. I have this query to get quarter and week numbers. I now want to get the week ending date(always saturday).

SELECT tblContractor.Contractor, tblJobs.JobName, tblHours.ST, tblHours.OT, tblHours.DT, tblHours.Shift, tblHours.WorkDate, DatePart("q",[WorkDate]) AS Cquarter, Format([WorkDate],"ww",2) AS Cweek
FROM (tblContractor INNER JOIN tblJobs ON tblContractor.tblContractorID = tblJobs.Contractor_ID) INNER JOIN tblHours ON tblJobs.tblJobs_ID = tblHours.Jobs_ID
GROUP BY tblContractor.Contractor, tblJobs.JobName, tblHours.ST, tblHours.OT, tblHours.DT, tblHours.Shift, tblHours.WorkDate, DatePart("q",[WorkDate]), Format([WorkDate],"ww",2)
ORDER BY tblHours.WorkDate, DatePart("q",[WorkDate]);

I've checked ms help but...
Can you help?
Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top