p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Beginning VB 6 (http://p2p.wrox.com/forumdisplay.php?f=75)
-   -   Adding weekdays (http://p2p.wrox.com/showthread.php?t=8871)

KevinO February 2nd, 2004 04:52 PM

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.

KO

gbianchi February 2nd, 2004 05:00 PM

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..

hth...

Gonzalo Bianchi


All times are GMT -4. The time now is 02:38 PM.

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