Microsoft
Software
Hardware
Network
Question : Comparable Objects
Good day Experts.
Ok this is driving me insane. I am trying to compare or if even exists from a dropdownlist.
If date = date in dropdownlist box then dont do anything else do something. But the main problem is if there are 2 dates it only seems to find one.
While sqlDR.Read
Dim mydate2 As String = sqlDR("FromDate")
Dim TestStr1 As String = mydate2
Dim TestStr2 As String = (CDate(Me.lstChooseDate.Se
lectedValu
e.ToString
.Split("|"
)(0)))
If StrComp(mydate2, TestStr2) = 0 Then
Response.Write("this is the same")
ElseIf StrComp(mydate2, TestStr2) = 1 Then
Response.Write("I do exists")
ElseIf StrComp(mydate2, TestStr2) = -1 Then
Response.Write("Sorry not there")
PopulateDistCombo3(CDate(M
e.lstChoos
eDate.Sele
ctedValue.
ToString.S
plit("|")(
0)), CDate(Me.lstChooseDate.Sel
ectedValue
.ToString.
Split("|")
(1)))
End If
I am not to sure if I am doing this right. A sample back with my code would help a great deal.
I just want to take the date in my reader compare it with the date in my dropdownlist box and if exists do something if not do something else. Even if there are 2 dates it will see that it exists already if there are 2 or even 4 different dates in my database.
Answer : Comparable Objects
You would need to consider that date part of datetime while comparing the dates
otherwise comparison would not work properly
Random Solutions
Installing Forefront Threat Management Gateway on SBS 2008 domain controller
hotmail is blocking IP
send sms from access to a mobile
To know 31st working date from the date entered
Append Query in Access 2007...
Exchange 2007 SP2 install fails on Unified Messaging
There is not enogugh memory to complete the automation object operation on the chart object
Can I add additional SSL cerificate for single domain?
How Can I Change Account Locked Out message
Fox 9 Microsoft Visual Fox Pro Support Library Error