SetToNow Method (DATETIME)
10.3A, PLBCMP GUI Only
The SetToNow method sets the value of the DATETIME object. The method uses the following format:
|
|
|
|
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.
localtime
Optional. A Numeric Variable or decimal number that specifies if the DATETIME value should be set to local time or UTC.
Flags Affected: EOS, OVER, ZERO
Note the following:
The DATETIME object is set to the current time.
If the {localtime} is set to one (1), the DATETIME value is set as local time. If the {localtime} is set to zero (0) the DATETIME value is set as UTC. If the {localtime} is not given, the DATETIME value is set as UTC.
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.
The OVER flag is set if the {return} variable is too small to store that value without being truncated.
The EOS flag is always cleared.
See Also: Method Syntax, DATETIME Methods
![]() |