User Tools

Site Tools


format_return_formatted_numbers_into_a_picture_.htm
Navigation:  Language Reference > 13 - Built-in Functions >====== FORMAT (return formatted numbers into a picture) ====== Previous pageReturn to chapter overviewNext page

FORMAT(value,picture)

blk2blue.jpg

FORMAT Returns a formatted string.
value A variable or expression for the value to be formatted.
picture A picture token, or the label of a STRING variable or expression containing a picture token.

The FORMAT procedure returns a string formatted according to the picture parameter.

Return Data Type: STRING

Example:

!Format the Social Security number:

Rpt:SocSecNbr = FORMAT(Emp:SSN,@P###-##-####P)

!Change phone format from dashes to parenthesis:

Phone = FORMAT(DEFORMAT(Phone,@P###-###-####P),@P(###)###-####P)

!Format a date as a string:

DateString = FORMAT(DateLong,@D1)

See Also:

DEFORMAT

Picture Tokens

format_return_formatted_numbers_into_a_picture_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1