473,383 Members | 1,874 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,383 software developers and data experts.

count days

28
I want to count the number of days reference a shipping order. I need to exclude weekends and holidays. Thank you.
Sep 15 '07 #1
2 2553
Scott Price
1,384 Expert 1GB
I want to count the number of days reference a shipping order. I need to exclude weekends and holidays. Thank you.
Hello Dean,

This thread: Calculate end date (working day) in Access has a function written to count week days (excluding week-ends).

Excluding holidays will be a little more difficult, since these change depending on country, region, etc. As far as I know, Access/VBA does not have a list of holidays built-in so you will likely have to create one that applies to your corner of the world.

To do this, you'll create a table, call it tblHolidays, give it a primary key of HolidayID Autonumber, second field is HolidayDate, third is HolidayName.

You'll have to open this into a recordset programatically and loop through comparing each date with the fixed holiday date to get your day count minus holidays. Then you can run the result through the weekday count function to return a final number of working days.

We'll be happy to help on any parts of this you don't understand, or get stuck on, but we'll wait until you make a start since we can't do the work for you :-)

Regards,
Scott
Sep 17 '07 #2
NeoPa
32,556 Expert Mod 16PB
A new thread (Count Working Days) has been created from a hijack post added in here.
Jul 6 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Tom | last post by:
Please help. I need a quick little scrpit to place on a web page that will count how many days have passed since January 1, 1970. I have ZERO experience writing ANY scripts. Anyone have any...
20
by: none | last post by:
I have managed to get the below script *almost* working. However, it still has a problem calculating the number of months. The date I am trying to calculate from is Oct 15, 1994. With the correct...
2
by: HeroinNO.4 | last post by:
Copy the code below and save in a .htm file, for example : 1.htm, then run it in browser, you'll see a cool count down timer ! If it doesn't work, you may open http://www.fillweb.com in IE and...
2
by: HeroinNO.4 | last post by:
Hello everyone! Now the latest version of free count down timer source code is available in http://www.fillweb.com/countdown.htm, you can open it in IE and View->Source to see the latest version...
7
by: HeroinNO.4 | last post by:
Hello guys, free count down timer source code has updated to 06/11/27, you can copy the code below and save in a ".htm" file and run it in a browser support javascript 1.1 or later, or you can open...
2
by: Bobwhosmiles | last post by:
Hi, I use access to query a Jet database full of info about members of a club. Each attendance by each member at any of 18 sites is recorded in a table called qptHisAttendance I'm trying to...
3
missshaikh
by: missshaikh | last post by:
Hi all, i need the count down timer when button click the timer start and count down work on ASP.net :( i have one timer which is on JavaScript that run page onload . but i need the Button...
1
by: muld | last post by:
I've inherited a database system designed to calculate sickness absence statistics. There is a main table with an employee ID which also holds the number of days worked by that person in a year ....
7
by: Mike | last post by:
I have a routine that's calculating business days but its not counting the weekend days that are between the start date and end date. If my start date is 9/26/08 and my end date is 10/01/08, I...
9
by: sha2484 | last post by:
I need help to count days between 2 dates,where i want to count the days between current date and registeration date.Here is the code that i have write but it only compare the days , it do not...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.