Syntax

display_value = tostring$ (tag[occ])

Arguments

display_value: text

tag: database variable

occ: integer

Meaning

The format of a value stored in a numeric or date field may differ from the way it is presented in the application. For example, an ISO date field may have the presentation format European date. Likewise, a numeric field is usually stored with a dot as decimal separator, but may be presented on screen with a comma (if set up this way).

The tostring$ function allows ADAPL to reformat the stored numeric or date value to the presentation format set up for the field. Numbers and dates will then be converted to a string. This way, you can print these values in the format in which they are shown on screen.

Example

Assume a date field with tag DS has the data type ISO date (yyyy-mm-dd) and the presentation format European date (dd/mm/yyyy). The stored value (in occurrence 1) is 2010-07-06. If display_value is declared as a text variable, ADAPL converts this date to the European format as follows:

display_value = tostring$ (DS)

Result

displayvalue will be: 06/07/2010