473,385 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Business Days-Holidays Don't Matter

I have users inputting a "Request Date". Upon entering a date, I need
Access to populate a second field ("Due Date"). When they enter their
Request Date, I want Access to set the default value of Due Date =
Request Date + 9 Business Days (Holidays don't matter. Just want
Saturday and Sunday taken out). Any thoughts?

Apr 3 '06 #1
1 3711
igendreau wrote:
I have users inputting a "Request Date". Upon entering a date, I need
Access to populate a second field ("Due Date"). When they enter their
Request Date, I want Access to set the default value of Due Date =
Request Date + 9 Business Days (Holidays don't matter. Just want
Saturday and Sunday taken out). Any thoughts?


Assuming [Request Date] is on a business day, add two weeks, i.e., 10
business days. Then subtract one day unless that day is a Monday where
three days are subtracted. Note that adding 14 days does not change
the Weekday value.

DateAdd('d', IIf(Weekday([Request Date]) <> 2, -1, -3), DateAdd('d',
14, [Request Date]))

If [Request Date] can fall on a weekend, Saturdays subtract two days
and Sundays subtract three days.

DateAdd('d', IIf(Weekday([Request Date]) < 3, -3, IIf(Weekday([Request
Date]) = 7, -2, -1)), DateAdd('d', 14, [Request Date]))

Post back if you need something more general or something elegant.

James A. Fortune
CM********@FortuneJames.com

Apr 4 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: pb648174 | last post by:
Greeting, below is the complete SQL taken from aspfaq.com (retrieved from this newsgroup I believe) The query takes about two minutes to run. Does anybody have a better set based way (sub-second...
12
by: Anthony Robinson | last post by:
Is anyone aware of a function (system or user defined) that will calculate business days? For instance: I have a column in as table called DATE. I want to be able to add five business days to that...
5
by: G. Stewart | last post by:
The word "Business" in the term implies some sort of commercial aspects or connotations. But from what I can see, that is not necesserially the case at all? So what is the reasoning behind the...
0
by: GHUM | last post by:
In 2006, EuroPython will be from the 3rd to the 5th of July at CERN, near Geneva in Switzerland. In business & applications we want to hear about how you made your fortune with Python. Show us...
4
by: CDMAPoster | last post by:
I'm starting to come up with a version of DateAdd that I call BusinessDateAdd that adds the selected number of business days. It's still in preliminary form (needs testing) and interacts with my...
0
by: YellowFin Announcements | last post by:
Whitepaper: "Yellowfin Reporting" enables Embedded Business Intelligence -------------------------------------------------------------------------------- Embedded reports are a standard...
7
by: Sam | last post by:
Hi, I use C# in my ASP.NET projects. Here's what I need to do: I want to add x business days to a given date i.e. add 12 business days to today's date. What is the best, fastest and most...
0
by: YellowFin Announcements | last post by:
There is a transformational change going on in business intelligence. Users are becoming more and more demanding. They want access to their real-time data without the complications of IT staff or...
2
by: brains4math | last post by:
Hi, is there a method in C# that calculates the number of business days between given dates, like networkdays in Excel? Thank you!
17
by: trixxnixon | last post by:
i have a form with these fields Priority level: urgent critical standard business days: 1, 3, 15 date submitted: current date due date:
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.