SetToDateTime Method (DATETIME)


10.3A, PLBCMP GUI Only

 

The SetToDateTime method moves the value of one DATETIME object into another DATETIME object. The method uses the following format:

 

[label]

{object}.SetToDateTime

[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 used as the new value.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. The value of the DATETIME object given as a parameter is moved to the invoking DATETIME object.

  2. The ZERO flag is set with a return value of zero. When ZERO flag is cleared, a non-zero value indicates an error has occurred and the error values are found in the DATETIME object notes.

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

  4. The EOS flag is always cleared.

 

 

See Also: Method Syntax, DATETIME Methods

 



PL/B Language Reference SetAsString Method (DATETIME) SetToNow Method (DATETIME)