Applying Field Formats
The following topics discuss issues you must consider when specifying field formats.
Numbers Format in FIXED Files
When you write numeric data to a FIXED format flat file, all numbers are right-justified in the file field. Numbers with decimal places specified are written with zeros padding the unused decimal places.
For example, a sequence of records with numbers of varying precision is written this way:
001 53.2700BUY
002 2174.0933SELL
003 108.0000SELL
Date, Time, and Datetime Field Lengths
In accordance with the International Organization for Standardization (ISO) 8601 standards, the field lengths for date, time, and Datetime fields are fixed in the file layout, regardless of the file format:
-
Date fields have a fixed length of 10.
-
Time fields have a fixed length of 20.
-
Datetime fields have a fixed length of 31.
Datetime fields must use one of these formats.
-
CCYY-MM-DD HH:MM:SS
-
CCYY-MM-DDTHH:MM:SS (with time separator)
-
CCYY-MM-DD HH:MM:SS.ssssss (with fraction of seconds)
-
CCYY-MM-DDTHH:MM:SS.ssssss (with time separator and fraction of seconds)
-
CCYY-MM-DD HH:MM:SS.ssssss+hhmm or CCYY-MM-DD HH:MM:SS.ssssss-hhmm (with fraction of seconds and universal time zone offset)
-
CCYY-MM-DDTHH:MM:SS.ssssss+hhmm or CCYY-MM-DDTHH:MM:SS.ssssss-hhmm (with time separator, fraction of seconds, and universal time zone offset)
Note:
PeopleSoft applications comply with ISO 8601 guidelines for representing date field data. Refer to the ISO 8601 guidelines for more information.
See http://www.w3.org/TR/NOTE-datetime.
Date Format with the ReadRowset Method
Single digits in dates in the form MMDDYY or MMDDYYYY must be padded with zeros. That is, if the date in the data is February 3, 2002, then the format must be:
-
02/03/2002
-
02/03/02
The format 2/3/02 is not valid.
When using the date format DDMMYY, single digits should also be padded with zeros, and the month value should be all uppercase letters. For example, if the date in the data is February 2, 2003, then the format must be 02-FEB-03. The format 2-Feb-03 is not valid.
Related Topics