DATETIME
10.3A, PLBCMP GUI Only
The DATETIME object provides the PL/B language a means of loading, storing, and manipulating date/time values To define a DATETIME, use one of the following statement formats:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Data Label.
%
Optional. Denotes the item as being GLOBAL.
arraysize
Required. An integer decimal constant, CONST variable, or EQUATEd value indicating the number of array items.
^
Optional. Denotes the item as being a POINTER.
target
Required. The name of a previously defined data item of the same type.
Flags Affected: NONE
Note the following:
The DATETIME object is used directly without having to be created. There are no properties, events, or instructions for a DATETIME object. All interaction with the DATETIME object is through methods.
The first method invoked on a DATETIME object causes the object to be created with the current time and date.
Possible error codes returned by DATETIME methods are defined as follows:
|
Error Code |
Value |
Comment |
|
DtErrorNone |
0 |
|
|
DtErrorNotValid |
1 |
DATETIME object is not valid. |
|
DtErrorParamNotValid |
2 |
DATETIME parameter is not valid. |
|
DtErrorYearNotValid |
3 |
|
|
DtErrorBadTz |
4 |
|
|
DtErrorBadHHMM |
5 |
|
|
DtErrorBadSS |
6 |
|
|
DtErrorBadYMD |
7 |
|
|
DtErrorExtraChars |
8 |
Unknown characters at end of date string |
|
DtErrorUnknownFormat |
9 |
|
|
DtErrorInvalidMod |
10 |
|
|
DtErrorInvalidModNum |
11 |
|
|
DtErrorInvalidModType |
12 |
|
|
DtErrorLocalTime |
13 |
Issue with localtime system call |
|
DtErrorInvalidJD |
14 |
Invalid Julian date |
|
DtErrorFmtCharMismatch |
15 |
Character format mismatch |
|
DtErrorFmtyy |
16 |
Format error year |
|
DtErrorFmtmm |
17 |
Format error month |
|
DtErrorFmtdd |
18 |
Format error day |
|
DtErrorFmtHH |
19 |
Format error hours |
|
DtErrorFmtMM |
20 |
Format error minutes |
|
DtErrorFmtSS |
21 |
Format error seconds |
|
DtErrorFmtFS |
22 |
Format error fractional seconds |
|
DtErrorFmtJD |
23 |
Format error Julian date |
|
DtErrorFmtInvalidDate |
24 |
Format error invalid date |
|
DtErrorFmtP |
25 |
|
See Also: Object Definitions
![]() |