Compare The Date Fields?May 26, 2010
I have 2 Textboxes with Date/Time in them. I want to test if one is less than the other, here is my current code
Dim StartTime1TextBox As TextBox = TryCast(FormView1.FindControl("StartTime1TextBox"), TextBox)
Dim EndTime1TextBox As TextBox = TryCast(FormView1.FindControl("EndTime1TextBox"), TextBox)
If Not [String].IsNullOrEmpty(StartTime1TextBox.Text) Then
However if I enter an Start time of 9:00 AM and an End Time of 5:00 PM this triggers the isvalid=false because 5 is less than 9. Doesn't look like it's comparing the date and time just number.