Default and alternative timestamp value formats vary. If using DB2 ECM, consult IBM documentation on differing formats. For OpenESQL, review the TSTAMPSEP SQL compiler directive option topic for more information.
yyyy-mm-dd hh:mm:ss[.f[f[...]]]where the number of fractional digits is driver-defined. An example value for this format is:
1994-05-24 12:34:00.000
01 timestamp1 PIC X(29). 01 timestamp2 SQL TYPE IS TIMESTAMP.
The timestamp2 format uses the TIMESTAMP SQL TYPE.
01 timestamp3 PIC X(n). 01 timestamp4 SQL TYPE IS TIMESTAMP-RECORD.
MOVE "yyyy-mm-dd hh:mm:ss" TO timestamp1
MOVE "yyyy-mm-dd hh:mm:ss" TO timestamp2
MOVE "{ts 'yyyy-mm-dd hh:mm:ss[.f[f[...]]]'}" TO timestamp3
MOVE yyyy TO host-var-year MOVE mm TO host-var-month MOVE dd TO host-var-day MOVE hh TO host-var-hour MOVE mm TO host-var-minute MOVE ss TO host-var-sec MOVE ff TO host-varc-fra
01 timestamp5 type System.DateTime.
The TIMESTAMP data type has a maximum length of 26 characters.