Top
PowerCOBOL V11.0 Reference
FUJITSU Software

4.152 InputFormat Property

Description:

Defines the order in which the year, month and day are entered for dates.

Note: The DateStyle and DateFormat properties determine how the date is displayed.

Used in object:

RenderText

Value:

The format is defined by entering a permutation of the following three strings:

yyyy : 4 digit year (e.g. 2003)

MM : Numeric month (1 to 12)

dd : Numeric day (1 to 31)

e.g. "yyyyMMdd" or "MMddyyyy"

Note that:

- The InputFormat property is only effective when the RenderStyle property is "2-Date".

- You can only specify each of the above strings one time.

e.g. Mmddyyyy

yyyyMMdd

yyyyMMddMM <= incorrect

- The strings are case sensitive.

e.g. mmddyyyy <= incorrect

MMddYYYY <= incorrect

- You must specify all of the three strings.

e.g. MMdd <= incorrect

yyyyMM <= incorrect

- You cannot insert other strings to this format.

e.g. MM,dd,yyyy <= incorrect

yyyy-MM-dd <= incorrect

- The InputFormat is entered using strings to allow expansion to many formats in the future.

When you input the date at execution time, you can use the delimiters, slash (/), hyphen (-), period (.) or the delimiter specified to the system (Date separator in the Date tab of Regional Settings in the Control Panel).

For example, if you specified the InputFormat "MMddyyyy", you can input the date at execution time as any of the following strings:

12/31/2003

12.31. 2003

12-31-2003

12312003

RenderText:

When you refer to the Text property, the RenderText object converts the string to the InputFormat. For example, if you:

- specify the InputFormat "ddyyyyMM", and

- input the date at execution time "31. 2003.12", and

- code:

01 WK1 PIC X(8).
...

PROCEDURE DIVISION.

...

MOVE "Text" OF CmText1 TO WK1.

The value stored in WK1 is "31200312".

Default value:

None.

COBOL picture:

X, up to 8192 bytes

OLE data type:

VT_BSTR

Design time access:

Set and reference.

Execution time access:

Reference only.

Backward compatibility attribute:

None.