Liquid XML Data Binder 2019
VB6 CompareTo - DateTime
Liquid XML Data Binder (C++, Java, VB6) > Reference > Visual Basic 6 > Reference > DateTime > VB6 CompareTo - DateTime

Public Function CompareTo(ByVal rhs As DateTime) As DTCompareResult

Public Enum DTCompareResult
End Enum

  Property Description  
    Argument - rhs The DateTime to compare with  

Using the following example

Dim dtFuture as new LtXmlComLib17.DateTime
Dim dtPast as new LtXmlComLib17.DateTime
Dim dtRes as DTCompareResult

dtRes = dtFuture.CompareTo(dtPast)

DTCompareResult_equal - if the dtFuture was the same as dtPast
DTCompareResult_lessThan - if the dtFuture was before dtPast
DTCompareResult_greaterThan - if the dtFuture was after dtPast
DTCompareResult_indeterminate - if the dtFuture of different type to dtPast

    Description Compares this DateTime with another DateTime.  
    Remarks Time zones are normalized out before the comparision.