Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 2nd, 2004, 04:52 PM
Registered User
Join Date: Oct 2003
Location: Manassas, VA, USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Adding weekdays

I want to calculate the number of weekdays between two dates, not including Saturdays or Sundays. So that if I submitted 1/1/2004 and 2/2/2004, I would get back 23. I know there has to be an easy way to do this.

Reply With Quote
  #2 (permalink)  
Old February 2nd, 2004, 05:00 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi

hi there..

there is a function call weekday(). receive a date and gives you what day of the week that date is..

compare it with vbsunday and vbsaturday and only add whatevers are different from that..


Gonzalo Bianchi
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
adding cells lcan4 Excel VBA 2 September 6th, 2006 06:08 AM
Using weekdays in a formula narooma.12 Crystal Reports 0 May 6th, 2005 08:37 PM
calculate weekdays jberk Access VBA 3 September 15th, 2004 05:54 PM
Adding in textboxes slgknjn Beginning VB 6 1 July 20th, 2004 12:20 PM
adding to a database gmoney060 Classic ASP Databases 5 April 9th, 2004 02:21 AM

All times are GMT -4. The time now is 09:54 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.