timestampFormat

The timestampFormat property identifies the format for timestamps that are displayed on a form or maintained in a JSF handler.

The following values are valid:
"pattern"
The value of pattern consists of characters that describe a time format; see Date/time masks and format specifiers.

You can drop characters from the beginning or end of a complete timestamp specification, but not from the middle.

defaultTimestampFormat
In a Java™ environment, the default is set by the Java locale.
db2TimestampFormat
The pattern "yyyy-MM-dd-HH.mm.ss.ffffff", which is the IBM® DB2® default timestamp format.
odbcTimestampFormat
The pattern "yyyy-MM-dd HH:mm:ss.ffffff", which is the ODBC timestamp format.

I/O considerations for timestamps

Data entered into a variable field is checked to ensure that the time and date was entered in the format specified. The user does not need to enter leading zeros, but can specify, for example, 2006-2-9 8:15 instead of 2006-02-09 08:15. However, the user who omits the separator characters must enter all leading zeros.

A timestamp stored in internal format is not recognized as a time and date, but simply as data. For example, if a timestamp field is moved to a character field of greater length, EGL pads the destination field with blanks. However, when the value is presented on a form, EGL converts the time from its internal format appropriately.

Compatibility

Table 1. Support for timestampFormat property
Data item JSF handler VGUI record Console UI Text Form Java Text Form COBOL Print Form Java Print Form COBOL
Yes Yes* Yes No Yes* No Yes* No

* The following additional compatibility considerations apply:

Table 2. Compatibility considerations for timestampFormat
Platform Issue
JSF handler
  • The field length must be sufficient for the timestamp pattern you specify, but can be longer.
  • In the case of a numeric field, the separator characters are excluded from the length calculation.
Text UI The field length must match the length of the timestamp pattern you specify.

Feedback