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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Working with dates

Status
Not open for further replies.

puforee

Technical User
Oct 6, 2006
741
US
I am working with a DB that tracks training classes. I have a requirement to produce a report indicating Current classes in session. The DB contains the start date and end date. My query contains this criteria. End Date >=[Enter Beginning of Week:] and Start Date <=[Enter End of Week:]. This allows the user to select the week for the report.

Now I need to show classes that started during the selected week verses classes that continued from the previous week.

So my difficulty is working with dates limited to the current week (selected) and comparing the Start Date to them to get my answer.

I am not sure how to do this. My query feeds a report.
 
Purforee,
You should look into Datepart("ww",SomeDate)

the ww is the week-of-year. You may need to use the Year part as well when you span years.
--Jim
 
jsteph,

OK, I will give it a try. I will let you know how it goes.

Thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top