Sunday, October 17, 2010

Ain't a date and not Null

#1/1/1900# or #12:00:00 AM# or #1/1/190012:00:00 AM# is neither null or a date so life isn't simple when working with it. So this would help.

Private Function IsDateNull(ByVal lDate As Date) As Boolean
Dim comparerDate As Date = Nothing

If lDate.CompareTo(comparerDate) <> 0 Then
Return False
Return True
End If
End Function