I am using ASP.NET VB. I am tring to make sure one date is greater than the other.
I have the following:
For Each row1 In dtDataTable2.Rows
If (row1("ActualDate") > row1("DueDate")) Then
End If
Next
Both ActualDate and DueDate are dates.
I get the following:
Option Strict on prohibits operands of type Object ‘>’.
If you change your code to something like:
it will work.
The value type returned by the default property on a DataRow (which is the Item property) is an object, so you need to convert the object to the type of data you need.