I am trying to write an if statement for two datetimepickers. I have a start date and end date and I do not want the value of the start date to be greater than the end date.
Here is what I have tried but doesn't work:
If dateStart.Value.Date < dateend.Value.Date Then
lblstatus.Text = "Status: Start date must be a date before end date."
Else
End If
>=instead of<in the comparison.