Required formats for date, time, and timestamp information
Your edit routine can format data from datetime columns, just as it can format data from columns with other data types. The one difference is that the value to be formatted, which appears in the control block field ECSINPT, is always passed as a character string, whether the code to be processed is a U code or a V code.
The expected format of the string is described in this table.
Data type | Form of the string |
---|---|
DATE data | yyyy-mm-dd where: The dashes (-) represent true dashes. For example, 2006-03-12 is the date March 12, 2006. |
TIME data | hh.mm.ss where: The periods represent true periods. For example, 13.08.36 is 1:08 P.M. and 36 seconds in the notation commonly used in the United States. |
TIMESTAMP data | yyyy-mm-dd-hh.mm.ss.nnnnnnnnnnnn where: For example, 2010-09-30-13.08.36.123456654321 is 1:08 P.M. and 36.123456654321 seconds on September 30, 2010, in the notation commonly used in the United States. |
TIMESTAMP WITH TIME ZONE data | yyyy-mm-dd-hh-mm-ss-nnnnnnnnnnnnzth:tm For example, 2010-09-30-13.08.36.123456654321-08:00 indicates a time of 1:08 P.M. and 36.123456654321 seconds on September 30, 2010, in San Jose, California, in the United States. The timestamp 2010-09-30-13.08.36.123456654321Z indicates a time of 1:08 P.M. and 36.123456654321 seconds wherever UTC is in effect. |