Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Forum
working days calculation
October 22, 2010
worked in students attendance in vb.net,i calculate no of working days between 2 dates,sattrday and sunday is leave so the o/p is minus from sunday and saturday ,how to add a some other leave days like newyear,pongal holidays in this form,i used this coding ,plz solve my pblm
Dim start As New DateTime
Dim holy As New DateTime
Dim [end] As New DateTime
start = DateTimePicker1.Text
[end] = DateTimePicker2.Text
holyday = DateTimePicker3.Text
Dim workingDays As Integer = 0
While start < [end]
If start.DayOfWeek <> DayOfWeek.Saturday AndAlso start.DayOfWeek <> DayOfWeek.Sunday AndAlso start.Date <> holyday Then
start = start.AddDays(1)
TextBox1.Text = workingDays
i tried this cod bt its not working
how to add add a holidays lik pongal,newyear..
Posted Date: October 22, 2010 Points: 5
Plz tell me, what is the error u g getting from this.
To post reply
Related Questions Related Questions
Standard Deviation Calculation
How to get business or working day in a month in c#
how do i get the number of days between two dates
What is IDE and its Working
How to count number of Days present?
How to find next upcoming birthdays after 15 days using sqlserver?
How to find number of days present in a month?
Calculation in DataGridView Columns
SQL Server 2005 - Working with IDENTITY column
HTML Line Break tag is not working in Chrome browser
Latest Forum Questions From The Same Category
Security Patch KB2898851 - VB6 application is not working
Automatic Insertion Of Record From one table to another by checking the Date.
unable to type values in datagridviewtextboxcolumn
i am a starter to asp.net
Vb.net Program ending Suddenly
VB.net-create session to call sql data table from diffrent part of image
Looping through access datatables and compare values to get conflicting data
Option Explicit vs Option Inter in VB.net
List info of all Mobile devices & Select COM Port for a device
exception while iterating through the records
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Quick Links For Forum Categories:
Hall of Fame
Terms of Service
Tell A Friend