PointInTime.Compare

Syntax:

Compare(<PointInTime>)

Parameters:

<PointInTime> (required)

Type: PointInTime.
A point in time that is compared.

Returned value:

Type: Number.
-1 - if the point in time is less than the other point in time, 0 - if the point in time is equal to the other point in time, 1 - if the point in time is greater than the other point in time.

Description:

Compares the point in time with another point in time.

Availability:

Server, thick client, external connection, Mobile application (server).

Example:

Moment1 = New PointOfTime(Doc1.Date, Doc1);
Moment2 = New PointOfTime(Doc2.Date, Doc2);
If 
Moment1.Compare(Moment2) = -Then
    Moment1 = Moment2;
EndIf
;


    

1C:Enterprise Developer's Community