.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Forum >> VB.Net >> Post New QuestionBookmark and Share Subscribe to Forum

working days calculation

Posted By: vidhya     Posted Date: October 22, 2010    Points:2   Category :VB.Net
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
End If
start = start.AddDays(1)
TextBox1.Text = workingDays

i tried this cod bt its not working

how to add add a holidays lik pongal,newyear..

Author: Santosh             
Posted Date: October 22, 2010     Points: 5   

Hi vidhya

Plz tell me, what is the error u g getting from this.


Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend