C
CSharp
C++
Java
Visual Basic
HTML - CSS
Android
Asp
Asp.Net
Php
Python
JavaScript
SQL
XML
Assembly
ActiveX
API
Code Snippets
Database
Files Directories Drives
Forms
Graphics Games
Multimedia
Strings
Windows and Controls
More...
Visual Basic > API and Miscellaneous sample source codes
Visual Basic Code > Function to find the number of working days there are between two dates.
Function to find the number of working days there are between two dates. 'Here is function that will find the number of working 'days (weekdays) there are between two dates. Function getBusDays(SDate As Date, EDate As Date) As Integer ' ' This function will find the number of ' business days between two dates. Dim tmpDay As Integer getBusDays = 0 Do Until SDate = EDate tmpDay = Format(SDate, "w") Select Case tmpDay Case 2, 3, 4, 5, 6 getBusDays = getBusDays + 1 End Select SDate = DateAdd("d", 1, SDate) Loop End Function
Privacy Policy
|
Contact
|
Advertising
|
Link to Us
|
Directory