Dim myDate1 As DateTime = datetimepicker1.value
Dim myDate2 As DateTime = datetimepicker2.value
Dim myDateToCheck As DateTime = datetimepicker3.value
'CHECK IF DATE TO CHECK FALLS BETWEEN THE GIVEN MONTHS AND DAY OF THE 2 DATES
If (myDateToCheck.Month >= myDate1.Month) AndAlso _
(myDateToCheck.Day >= myDate1.Day) AndAlso _
(myDateToCheck.Month <= myDate2.Month) AndAlso _
(myDateToCheck.Day <= myDate2.Day) Then
MessageBox.Show("The month/day given falls between the range given")
Else
MessageBox.Show("The month/day given DOES NOT fall between the range given")
End If
this is for a single date..but i have list of date ....and i want to check how many days fall from march 20 to apr 10 between jan 4 to apr5..
and count them...thanks...

New Topic/Question
Reply




MultiQuote




|