Compare Method (DATETIME)


10.3A, PLBCMP GUI Only

 

The Compare method compares the values of two DATETIME objects. The method uses the following format:

 

[label]

{object}.Compare

[GIVING {return}] USING [*DateTime=]{datetime}

 

Where:

label

Optional. A Program Execution Label.

object

Required. A DATETIME object that has previously been declared.

return

Optional. A Numeric Variable that returns an error value if this method fails.

datetime

Required. A second DATETIME object for the comparison.

Flags Affected: EOS, LESS, OVER, ZERO

Note the following:

  1. The ZERO flag is set if the DATETIME objects contain the exact same value.

  2. The LESS flag is set when the invoking DATETIME object is less than the DATETIME object given as the parameter.

  3. The EOS flag is always cleared.

  4. The OVER flag is set if the {return} variable is too small to store that value without being truncated.

 

 

See Also: Method Syntax, DATETIME Methods

 



PL/B Language Reference Adjust Method (DATETIME) GetAsSring Method (DATETIME)