Hi guys,

I need assistense in comparing whether values of a listbox and datetime picker are not equal.

thanks.

Well it seems as if you just want to check if the controls do not contains identical data. Because you not specific to either time or date you can do it like this:

If DateTimePicker1.ToString IsNot ListBox1.Text.ToString Then
' Do what ever you want here

End If

Sorry for not formatting the code I'm using the mobile phone. The code is not tested either but that how you could do it.

It seems like an assignment. Put your code here and will see what you got so far. then we will adjust your code from there.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.