I figured out to calculate two dates DAYS from each other..
But how do you write the IF statement so that if the day you picked before the date you checked in, it throws a flag?
I know it would be something like
If d1 < Current time... (I cant figure out the current time bit)
CODE
Private Sub DateTimeCheckOutPicker_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimeCheckOutPicker.ValueChanged
'Calculate the number of days the guest is staying at the hotel.
Dim d1, d2 As Date
d1 = Me.DateTimeCheckInPicker.Value 'Sets d1 as Check In date
d2 = Me.DateTimeCheckOutPicker.Value 'd2 as Checkout Date
If d1 > d2 Then
MessageBox.Show("Error, Check in date must be before checkout")
Me.DateTimeCheckInPicker.Focus()
Else
strNumberofnights = CStr(d2.Subtract(d1).Days) ' Compares two dates and subracts the days
End If