Problem with Time Comparison Year 2010 to 2011

I have a question, is there any know issue with NotesDateTime with Comparing Dates in 2010 with Dates in 2011

Example:

Dim minDate As NotesDateTime

Dim maxDate As NotesDateTime

Set minDate = New NotesDateTime ( uidoc.FieldGetText (“queryCourseStart”))

Set maxDate = New NotesDateTime (uidoc.FieldGetText (“queryCourseEnd”))

If maxDate.DateOnly < minDate.DateOnly Then

Messagebox "Cannot execute Query, the 'From' date is After the 'To' Date selected!", 48 , "Incorrect Dates Selected"		

Exit Sub		

End If

When any min date in 2010 with a month earlier than 2011 causes a problem"

example

maxdate : 01/31/2011

Min : 10/01/2010

so maxdate.DateOnly < minDate.DateOnly

with the dates above, an error always returns. Am I overlooking something?

Subject: Figured it out

DateOnly returns a string , so yes it was correct. I placed a Cdat for the comparison and its working fine… thanks for being my soundboard, if there are any other hairbrains out there hopefully this will help and prevent you from posting something obvious…lol