Bryan,
Something like this should do it:
<code (VB.NET) >
Dim adate As Date = Now
If CInt(Microsoft.VisualBasic.Right(strDate, 2)) + 2000 < adate.Year
OrElse CInt(Microsoft.VisualBasic.Left(strDate, 2)) < adate.Month Then
Console.WriteLine(strDate + " is less than " + Format(adate, "MMyy"))
ElseIf CInt(Microsoft.VisualBasic.Right(strDate, 2)) + 2000 = adate.Year
And CInt(Microsoft.VisualBasic.Left(strDate, 2)) = adate.Month Then
Console.WriteLine(strDate + " is equal to " + Format(adate, "MMyy"))
Else
Console.WriteLine(strDate + " is greater than " + Format(adate, "MMyy"))
End If
</code>
-Sam Matzen
system clock in vb.net. If I have a string "0306", this is the format month
and year. I'd like to compare it to the month and year of the system clock
and see which is greater. Thanks.