$nlsformat

Set or return the current NLS format value, which determines how locale-sensitive data is displayed.

$nlsformat = "nlslocale" | "classic"

Result = $nlsformat

Parameters

Parameters
Parameter Data Type Description
nlslocale String Display data of type Number, Float, Date, Time, and Datetime according to the current locale, if $nlslocale is not set to classic
classic String Ignore the locale when displaying locale-sensitive data

Return Values

Returns the current setting.

Use

Allowed in all component types.

Description

When setting $nlsformat, you can specify a string, field, or variable that evaluates to a string. Setting $nlsformat overrides the value of the $NLS_FORMAT assignment setting, if specified.

When $nlsformat is set to nlslocale:

  • All display formats for Number, Float, Date, Time, and Datetime data are treated as if an $NLS format has been applied.

    Thus, the display format DIS(zzzP99) becomes DIS($NLS(zzzP99)). In this case, the P representing a decimal point is displayed as a comma if $nlslocale is de_DE, meaning German(Germany), or as a period if the locale is English (United States).

  • The return values of the ProcScript functions $number, $date, $clock, and $datim, which parse a string to convert it to the respective data type, are displayed in accordance with the locale.

    Thus, if the value of $datim is 2009122316094200, it is displayed as Dec 23, 2009 4:09:42 PM if the locale is English (United States), and as 23 Dec 2009 16:09:42 if the locale is English (United Kingdom).

Effect of Locale on Displayed Date

Given a DateTime value of 2019120216094200, and the display format DIS($NLS(FULL, DATE)), the following table shows how the date is displayed is displayed for some locales:

Effect of Locale on Displayed Dates
Locale Code Locale Displayed Data
en_US English (United States) Wednesday, December 2, 2019
en_GB English (United Kingdom) Wednesday, 2 December 2019
fr_CA French (Canada) mercredi 2 décembre 2019
nl_NL Dutch (Netherlands) woensdag 2 december 2019
ja_JP Japanese (Japan) 2019年12月2日水曜日
bg_BU Bulgarian (Bulgaria) 02 декември 2019, сряда
History
Version Change
9.4.01 Introduced

Related Topics