FPRINT: Displaying a Value in a Specified Format

How to:

Given an output format, the simplified conversion function FPRINT converts a value to alphanumeric format for display.

Note: A legacy FPRINT function also exists and is still supported. For information, see FPRINT: Converting Fields to Alphanumeric Format. The legacy function has an additional argument for the name or format of the returned value.

Syntax: How to Display a Value in a Specified Format

FPRINT(value, 'out_format')

where:

value

Any data type

Is the value to be converted.

'out_format'

Fixed length alphanumeric

Is the display format. For information about valid display formats, see the manual.

Example: Displaying a Value in a Specified Format

FPRINT converts a date to alphanumeric format.

FPRINT(TIME_DATE, 'YYMtrD')

For 01/03/2009, the result is 2009, January 3.

WebFOCUS

Feedback