Format String
General
Available language names
Number format
Date format
Boolean format
Examples
Format string is a string value that includes formatting options.
Formatting options are separated by semi-colon (";"). If an option is present, formatting does not match the default one.
If an option is not specified, default formatting is applied (generally corresponding to conversion of a value to a string). However, for Number and Date values by default (0 and 01/01/0001 00:00:00 respectively) an empty string will be produced.
Every option is specified by its name, equality symbol ("=") and option value. Option value may be specified in single or double quotes. It is required if option value contains characters used in format string syntax. Option value may include arbitrary characters that will be displayed as is when the resulting string is generated. For example, you can use this feature to specify separators of hours, minutes, and seconds for time formatting. If these characters match the values of the format string, they should be enclosed in single quote.
Names and values of format line options:
- L - language name, countries for
default formatting to be applied. Available language names:
- af Afrikaans
- af_ZA Afrikaans (South Africa)
- am Amharic
- am_ET Amharic (Ethiopia)
- ar Arabic
- ar_AE Arabic (United Arab Emirates)
- ar_BH Arabic (Bahrain)
- ar_DZ Arabic (Algeria)
- ar_EG Arabic (Egypt)
- ar_IQ Arabic (Iraq)
- ar_JO Arabic (Jordan)
- ar_KW Arabic (Kuwait)
- ar_LB Arabic (Lebanon)
- ar_LY Arabic (Libya)
- ar_MA Arabic (Morocco)
- ar_OM Arabic (Oman)
- ar_QA Arabic (Qatar)
- ar_SA Arabic (Saudi Arabia)
- ar_SD Arabic (Sudan)
- ar_SY Arabic (Syria)
- ar_TN Arabic (Tunisia)
- ar_YE Arabic (Yemen)
- as Assamese
- as_IN Assamese (India)
- az Azerbaijani
- az_AZ Azerbaijani (Azerbaijan)
- az_Cyrl Azerbaijani (Cyrillic)
- az_Cyrl_AZ Azerbaijani (Cyrillic, Azerbaijan)
- az_Latn Azerbaijani (Latin)
- az_Latn_AZ Azerbaijani (Latin, Azerbaijan)
- be Byelorussian
- be_BY Byelorussian (Belarus)
- bg Bulgarian
- bg_BG Bulgarian (Bulgaria)
- bn Bengali
- bn_IN Bengali (India)
- ca Catalan
- ca_ES Catalan (Spain)
- cs Czech
- cs_CZ Czech (Czech Republic)
- cy Welsh
- cy_GB Welsh (United Kingdom)
- da Danish
- da_DK Danish (Denmark)
- de German
- de_AT German (Austria)
- de_BE German (Belgium)
- de_CH German (Switzerland)
- de_DE German (Germany)
- de_LU German (Luxembourg)
- el Greek
- el_GR Greek (Greece)
- en English
- en_AU English (Australia)
- en_BE English (Belgium)
- en_BW English (Botswana)
- en_CA English (Canada)
- en_GB English (United Kingdom)
- en_HK English (Hong Kong (Special administrative region, China))
- en_IE English (Ireland)
- en_IN English (India)
- en_MT English (Malta)
- en_NZ English (New Zealand)
- en_PH English (Philippines)
- en_PK English (Pakistan)
- en_SG English (Singapore)
- en_US English (United States of America)
- en_VI English (United States Virgin Islands)
- en_ZA English (South Africa)
- en_ZW English (Zimbabwe)
- es Spanish
- es_AR Spanish (Argentina)
- es_BO Spanish (Bolivia)
- es_CL Spanish (Chile)
- es_CO Spanish (Colombia)
- es_CR Spanish (Costa Rica)
- es_DO Spanish (Dominican Republic)
- es_EC Spanish (Ecuador)
- es_ES Spanish (Spain)
- es_GT Spanish (Guatemala)
- es_HN Spanish (Honduras)
- es_MX Spanish (Mexico)
- es_NI Spanish (Nicaragua)
- es_PA Spanish (Panama)
- es_PE Spanish (Peru)
- es_PR Spanish (Puerto Rico)
- es_PY Spanish (Paraguay)
- es_SV Spanish (El Salvador)
- es_US Spanish (United States of America)
- es_UY Spanish (Uruguay)
- es_VE Spanish (Venezuela)
- et Estonian
- et_EE Estonian (Estonia)
- eu Basque
- eu_ES Basque (Spain)
- fa Persian
- fa_AF Persian (Afghanistan)
- fa_IR Persian (Iran)
- fi Finnish
- fi_FI Finnish (Finland)
- fo Faeroese
- fo_FO Faeroese (Faroe Islands)
- fr French
- fr_BE French (Belgium)
- fr_CA French (Canada)
- fr_CH French (Switzerland)
- fr_FR French (France)
- fr_LU French (Luxembourg)
- ga Irish
- ga_IE Irish (Ireland)
- gl Galician
- gl_ES, Galician (Spain)
- gu Gujarati
- gu_IN Gujarati (India)
- he Hebrew
- he_IL Hebrew (Israel)
- hi Hindi
- hi_IN Hindi (India)
- hr Croatian
- hr_HR Croatian (Croatia)
- hu Hungarian
- hu_HU Hungarian (Hungary)
- hy Armenian
- hy_AM Armenian (Armenia)
- hy_AM_REVISED Armenian (Armenia, REVISED)
- id Indonesian
- id_ID Indonesian (Indonesia)
- is Icelandic
- is_IS Icelandic (Iceland)
- it Italian
- it_CH, Italian (Switzerland)
- it_IT Italian (Italy)
- ja Japanese
- ja_JP Japanese (Japan)
- ka Georgian
- ka_GE Georgian (Georgia)
- kk Kazakh
- kk_KZ Kazakh (Kazakhstan)
- kl Greenlandic
- kl_GL Greenlandic (Greenland)
- kn Kannada
- kn_IN Kannada (India)
- ko Korean
- ko_KR Korean (South Korea)
- kok Konkani
- kok_IN Konkani (India)
- ky Kirghiz
- ky_KY Kirghiz (Kyrgyzstan)
- lt Lithuanian
- lt_LT Lithuanian (Lithuania)
- lv Lettish
- lv_LV Lettish (Latvia)
- mk Macedonian
- mk_MK Macedonian (Macedonia)
- ml Malayalam
- ml_IN Malayalam (India)
- mr Marathi
- mr_IN Marathi (India)
- ms Malay
- ms_BN Malay (Brunei)
- ms_MY Brunei (Malaysia)
- mt Maltese
- mt_MT Maltese (Malta)
- nb Norwegian Bokmal
- nb_NO Norwegian Bokmal (Norway)
- nl Dutch
- nl_BE Dutch (Belgium)
- nl_NL Dutch (Netherlands)
- nn Norwegian Nynorsk
- nn_NO Norwegian Nynorsk (Norway)
- om Oromoo (Afaan)
- om_ET Oromoo (Afaan) (Ethiopia)
- om_KE Oromoo (Afaan) (Kenya)
- or Oriya
- or_IN Oriya (India)
- pa Punjabi
- pa_IN Punjabi (India)
- pl Polish
- pl_PL Polish (Poland)
- ps Pashto (Pushto)
- ps_AF Pashto (Pushto) (Afghanistan)
- pt Portuguese
- pt_BR Portuguese (Brazil)
- pt_PT Portuguese (Portugal)
- ro Romanian
- ro_RO Romanian (Romania)
- ru Russian
- ru_RU Russian (Russia)
- ru_UA Russian (Ukraine)
- sk Slovak
- sk_SK Slovak (Slovakia)
- sl Slovenian
- sl_SI Slovenian (Slovenia)
- so Somali
- so_DJ Somali (Djibouti)
- so_ET Somali (Ethiopia)
- so_KE Somali (Kenya)
- so_SO Somali (Somalia)
- sq Albanian
- sq_AL Albanian (Albania)
- sr Serbian
- sr_CS Serbian (Serbia and Montenegro)
- sr_Cyrl Serbian (Cyrillic)
- sr_Cyrl_CS Serbian (Cyrillic, Serbia and Montenegro)
- sr_Cyrl_YU Serbian (Cyrillic, Yugoslavia)
- sr_Latn Serbian (Latin)
- sr_Latn_CS Serbian (Latin, Serbia and Montenegro)
- sr_Latn_YU Serbian (Latin, Yugoslavia)
- sr_YU Serbian (Yugoslavia)
- sv Swedish
- sv_FI Swedish (Finland)
- sv_SE Swedish (Sweden)
- sw Swahili
- sw_KE Swahili (Swahili)
- sw_TZ Swahili (Tanzania)
- ta Tamil
- ta_IN Tamil (India)
- te Telugu
- te_IN Telugu (India)
- th Thai
- th_TH Thai (Thailand)
- ti Tigrinya
- ti_ER Tigrinya (Eritrea)
- ti_ET Tigrinya (Ethiopia)
- tr Turkish
- tr_TR Turkish (Turkey)
- uk Ukrainian
- uk_UA Ukrainian (Ukraine)
- ur Urdu
- ur_PK Urdu (Pakistan)
- uz Uzbek
- uz_Cyrl Uzbek (Cyrillic)
- uz_Cyrl_UZ Uzbek (Cyrillic, Uzbekistan)
- uz_Latn Uzbek (Latin)
- uz_Latn_UZ Uzbek (Latin, Uzbekistan)
- uz_UZ Uzbek (Uzbekistan)
- vi Vietnamese
- vi_VN Vietnamese (Vietnam)
- zh Chinese
- zh_CN Chinese (China)
- zh_Hans Chinese (Hans)
- zh_Hans_CN Chinese (Hans, China)
- zh_Hans_SG Chinese (Hans, Singapore)
- zh_Hant Chinese (Hant)
- zh_Hant_HK Chinese (Hant, Hong Kong (Special administrative region, China))
- zh_Hant_MO Chinese (Hant, Macao (Special administrative region, China))
- zh_Hant_TW Chinese (Hant, Taiwan)
- zh_HK Chinese (Hong Kong (Special administrative region, China))
- zh_MO Chinese (Macao (Special administrative region, China))
- zh_SG Chinese (Singapore)
- zh_TW Chinese (Taiwan)
- ND - Total number of displayed digits of integral and fractional parts. At that the original number is rounded in compliance with rounding rules: "1.5 as 20". If this option is specified, NFD option is also required to display fractional part of the number. If it is missing, the fractional part will not be displayed.
- NFD - number of decimal digits in the fractional part. At that the original number is rounded in compliance with rounding rules: "1.5 as 20".
- NS - Digits shift: positive - division, negative - multiplication In other words, it means that the original number will either be multipled or divided by 10*C, where C is option value for the module.
- NDS - separator of integral and fractional parts.
- NGS - separator of groups in integral part of a number. If a blank string is used for a separator, a non-breaking space character will serve as a separator.
- NZ - string that represents null value of the number. If it is not specified, presentation as a blank string is used. If NZ is specified, it should be "0". It is not used for number text boxes.
- NLZ - should the leading zeros be applied. No value is specified for this option. In fact, presence of the option determines if the leading zeros should be added.
- NG - approach to grouping number digits. The value format is comma separated numbers that define the number of grouped positions from right to left. Only the first two numbers are significant. The first number defines the initial grouping, which is applied to the least significant digits of the integer part. If the second number is not specified, only the least significant digits are grouped. If the second number is 0, the initial grouping is applied to all digits of the integer part. If the second number is not 0, this number is used for grouping all digits except the least significant ones that were grouped first.
- All other numbers in the NG list are ignored.
- NN - negative number presentation.
- 0 - string "(1,1)";
- 1 - string "(-1,1)";
- 2 - string "(-1,1)";
- 3 - string "(1,1-)";
- 4 - string "(1,1-)";
- DF - date format.
- d - day of the month (numeric) without a leading zero;
- dd - month date (numeric) with a leading zero;
- ddd short name for a day of the week *);
- dddd full name for a day of the week *);
- M - number of the month (numeric) without a leading zero;
- MM - month number (numeric) with a leading zero;
- MMM - short month name *);
- MMMM - full month name *);
- q - number of the quarter of a year;
- y - year number without century and leading zero;
- yy - year number without century but with a leading zero; < LI>yyyy - year number with century;
- h - hour in 12-hour version without leading zeros;
- hh - hour in 12-hour version with a leading zero;
- H - hour in 24-hour version without leading zeros;
- HH - hour in 24-hour version with a leading zero;
- m - minute without a leading zero;
- mm - minute with a leading zero;
- s - second without a leading zero;
- ss - second with a leading zero;
- tt - display of day part AM/PM (valid only for configuration development lnguages that support 12-hour time presentation version).
Note: *) - is not used for format string of date text boxes.
- DLF - local date format. Variant of date parts display is
specified.
- D - date (numeric);
- DD - long date (month spelled out);
- T - full time, date may be joined with time;
- DT - date time.
Example: the expression Format('20051120140323',"DLF=DDT") has a value of "20 November 2005 14:03:23".
Important! The order of options in the format string for DLF <date + time> (DT or DDT) cannot be changed.
- DE - string that represents an empty date (e.g. for the date '00010101000000' format string DE="empty date" will return the string "empty date").
- BF - string that represents Boolean False.
- BT - string that represents Boolean True.
Note: Options use for text box: DE option is not used; DLF option is only used with values D, T and DT.
// Sample number formatting
A = Format (123456.789, "ND=10; NFD=2");
// A = "123 456,79"
A = Format(123456.789, "NDS='-'");
// A = "123 456-789"
A = Format(-123456.789, "NN=0");
// A = "(123 456,789)";
// Sample date formatting
A = Format('20020820153309', "DF=""dd MMMM yyyy 'y.' HH:mm:ss""");
// A = "20 August 2002 15:33:09"
A = Format('20020820153309', "DF=""dd/MM-yyyy""");
// A = "20/08-2002"
A = Format('20020820153309', "DDT=DD");
// A = "20 August 2002";
A = Format('20020820153309', "DDT=D");
// A = "20.08.2002";
A = Format('20020820153309', "DDT=T");
// A = "15:33:09";
// Sample formatting of Boolean expressions
A = Format(True, "BF=Absent; BT=Available");
// A = "Available";
// Sample number formatting (for the value 123456.789):
Format String
Result
ND=10; NFD=2
123 456,79
NDS='-'
123 456-789
NN=0 (for a negative number)
(123 456,789)
// Sample date formatting for date value 20.08.2009 15:33:09
Format String
Result
DF="dd MMMM yyyy 'y.' HH:mm:ss"
20 August 2009 15:33:09
DF="dd/MM-yyyy"
20/08-2009
DDT=DD
20 August 2009
DDT=D
20.08.2009
DDT=T
15:33:09
// Sample formatting of Boolean expressions (for True value)
Format String
Result
BF=Absent; BT=Available
Available
BF=Off; BT=On
On
BF=Normal; BT=Important
Important