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  
 
Access: Next Business Day
By Richard Rost   Richard Rost on Twitter Richard Rost on LinkedIn Email 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
 
Only students may post on this page. Click here for more information on how you can set up an account. If you are a student, please Log On first. Non-students may only post in the Visitor Forum.
 
Subscribe
Subscribe to Access: Next Business Day
Get notifications when this page is updated
 
 

Check out these other pages that may be of interest to you:

3/25/2023Access Developer 42
3/24/2023Percent Bug
3/23/2023Replication ID
3/22/2023Disable AutoSave
3/21/2023Database Launcher
3/20/2023ChatGPT VBA Code
3/19/2023r/MSAccess
3/17/2023Quick Queries #8
3/16/2023Parent Record
3/15/2023Available Credit
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    Twitter

YouTube Channel    LinkedIn
Copyright 2023 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 3/26/2023 4:12:59 PM.
Keywords: access tips weekday date iif  PermaLink  Access: Next Business Day