Free Lessons Courses Seminars TechHelp Fast Tips Templates Topic Index Forum ABCD

 Home   Courses   Seminars   Templates   TechHelp   Fast Tips   Forums   Help   Contact   Join   Order   Logon More... What's New? Popular Links ------------ Access Courses Access Index Access TechHelp Access Forum ------------ Excel Courses Excel Index ------------ Code Vault Testimonials

By Richard Rost     15 years ago

Q: I need a query to return only a list of business days. For example, if the date of a work order is on a Saturday, then I need the system to treat it as if it's on the following business day (Monday).

A: Use the Weekday formula to determine the day of week. 1=Sunday, 2=Monday, etc. 7=Sunday. Then, just create a simple calculated query field to add 2 to your date if the day is Saturday, or 1 if it's Sunday.

Here's a calculated query field formula, for example, that will take a date MyDate and give you the next business day NewDate:

NewDate: IIf(Weekday([MyDate])=1,[MyDate]+1,IIf(Weekday([MyDate])=7,[MyDate]+2,[MyDate]))

Now just place that into your query, and you should have a list of valid "business day" dates for your work orders.

Start a NEW Conversation

Subscribe to Access: Next Business Day

 Check out these other pages that may be of interest to you:
 1/27/2023 Math in Fields 1/26/2023 Association 7 1/25/2023 Change Query 1/24/2023 Association 6 1/23/2023 Association 5 1/20/2023 Association 4 1/19/2023 Association 3 1/18/2023 Association 2 1/17/2023 Zodiac Signs 1/16/2023 Images From Web