Count Saturday, Sunday, Holiday and Non-Holiday

Count Saturday, Sunday, Holiday and Non-Holiday



I want to find total of Saturday, Sunday, Holiday & Non-holiday from start day to end day. When I run this code an error show. Pls give me solution. below my code.


Public Class Form1
Private Sub DateEdit2_EditValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateEdit2.EditValueChanged
Try
Dim countsun As Integer = 0
Dim countsat As Integer = 0
Dim NonHoliday As Integer
Dim TotalDay = (DateEdit2.DateTime.Date - DateEdit1.DateTime.Date).Days
For i = 0 To TotalDay
Dim Weekday As DayOfWeek = DateEdit1.DateTime.Date.AddDays(i).DayOfWeek
If Weekday = DayOfWeek.Saturday Then
countsat += 1
End If
If Weekday = DayOfWeek.Sunday Then
countsun += 1
End If
If Weekday <> DayOfWeek.Saturday AndAlso Weekday <> DayOfWeek.Sunday Then
NonHoliday += 1
End If
Next
LblSaturday.Text = countsat & " Day(s)"
LblSunday.Text = countsun & " Day(s)"
LblHoliday.Text = countsat + countsun & " Day(s)"
LblNonHoliday.Text = NonHoliday & " Day(s)"
Catch ex As Exception
End Try
End Sub





Any chance to get the error message and the line where this occurs?
– Steve
Aug 28 at 9:18





error is : Could not resolve this reference. Could not locate the assembly "DevExpress.Data.v12.2, Version=12.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
– rkdev
Aug 28 at 9:24





This error has nothing to do with this code. You haven't added a reference to DevExpress component mentioned in the error message. You should search how to add components to a VB project msdn.microsoft.com/en-us/library/wkze6zky.aspx
– Steve
Aug 28 at 9:26









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Crossroads (UK TV series)

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế