Progress
Report Builder
User’s Guide


STRING

Converts a value of any data type except memo into a character value.

SYNTAX

STRING ( source [ , format ] ) 

source

An expression (a constant, field name, or expression that results in a value ) of any data type, except MEMO that you want to convert to a character value.

format

The format you want to use for the new character value. This format must be appropriate to the data type of source. This is useful if you want to produce left-justified numbers. See the Progress Programming Handbook for information on data formats.

This function is the opposite of NUMERIC; that is, it constitutes a change in data type from NUMERIC to CHARACTER.

NOTE

If the value does not fit in the specified length, the STRING function returns UNKNOWN and displays it as a string of question marks.

EXAMPLE

To convert the customer number field (Cust-Num) from a numeric to a character expression, create a calculated field containing this expression:

STRING(Cust-Num) 

Sample data (default length of 10 is used):

Cust-Num   STRING(Cust-Num)
15	         "        15"
50	         "        50" 

To return the time of day, create a calculated field containing this expression:

STRING(TIME( ) "HH:MM") 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095