{"title":"Formatting values, dates, and time","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/devenv-format-property/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-format-property, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-format-property","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Learn how to format values, dates, and time in Business Central.","date":"2026-07-03","meta":{"topic":"concept-article"},"outline":[{"level":1,"title":"Formatting values, dates, and time","slug":"formatting-values-dates-and-time","at":0,"chars":11129},{"level":2,"title":"Remarks","slug":"remarks","at":146,"chars":282},{"level":2,"title":"Basic settings","slug":"basic-settings","at":428,"chars":492},{"level":2,"title":"Building formats","slug":"building-formats","at":920,"chars":4097},{"level":3,"title":"AttributeName values","slug":"attributename-values","at":1858,"chars":886},{"level":3,"title":"FieldName values","slug":"fieldname-values","at":2744,"chars":2273},{"level":4,"title":"Example","slug":"example","at":3585,"chars":1432},{"level":2,"title":"Standard decimal formats","slug":"standard-decimal-formats","at":5017,"chars":806},{"level":2,"title":"Standard date formats","slug":"standard-date-formats","at":5823,"chars":1156},{"level":2,"title":"Standard time formats","slug":"standard-time-formats","at":6979,"chars":787},{"level":2,"title":"Standard dateTime formats","slug":"standard-datetime-formats","at":7766,"chars":1593},{"level":2,"title":"Standard integer formats","slug":"standard-integer-formats","at":9359,"chars":162},{"level":2,"title":"Standard boolean formats","slug":"standard-boolean-formats","at":9521,"chars":136},{"level":2,"title":"Standard GUID formats","slug":"standard-guid-formats","at":9657,"chars":745},{"level":2,"title":"Standard enum formats","slug":"standard-enum-formats","at":10402,"chars":117},{"level":2,"title":"Standard option formats","slug":"standard-option-formats","at":10519,"chars":111},{"level":2,"title":"Standard XML and string formats","slug":"standard-xml-and-string-formats","at":10630,"chars":252},{"level":2,"title":"Related information","slug":"related-information","at":10882,"chars":247}],"text":"# Formatting values, dates, and time\nThe Format method in Business Central sets the format of the source expression for various data types in AL.\n## Remarks\nSet Format to a predefined format, or build your own format. See Format method (Integer, Text)<methods-auto/system/system-format-joker-integer-string-method> and Format method (Any [, Integer] [, Integer])<methods-auto/system/system-format-joker-integer-integer-method>.\n## Basic settings\nTo choose a predefined format, use the syntax: `<Standard Format,*X*>`. The available values depend on the data type. Values 0, 1, and 2 have the following common meanings. Other values are shown in the standard format tables later in this article.\nValue|Description\n0|Standard Display Format (the default for all data types)\n1|Standard Display Format 2 (edit)\n2|AL Code Constant Format\n> NOTE\n> You must enter the `<` and `>` angle brackets, such as `<Standard Format,2>`.\n## Building formats\nUse Format to create your own formats. Follow these rules to create a format:\n A format property consists of zero or more chars, fields, or attributes.\n Fields and attributes are expressed by using an identifier enclosed in brackets `<>`.\n Attributes must contain a comma `,` and a parameter after the identifier.\n Fields can optionally take a comma `,` and a FieldLen.\nThe following table shows the syntax.\nSyntax|Values\nFormatProperty :=|\\[\\<Char> | \\<Field> | \\<Attribute>\\]\n\\<Char> :=|character with ASCII value \\[32..255\\]\n\\<Field> :=|'\\<' \\<FieldName> \\[',' \\<FieldLen>\\] '>'<br /><br /> \\[, \\<Attribute>\\]\n\\<FieldName> :=|literal name of field \\(format component\\)\n\\<FieldLen> :=|length of field \\(0 or no entry means that the length is dynamic\\)\n\\<Attribute> :=|\\['\\<' \\<AttributeName> ',' \\<Char> '>'\\]\n\\<AttributeName> :=|\\[Standard Format | 1000Character | Comma | Overflow | Filler Character | Precision\\]\n### AttributeName values\nAttributeName value|Description\nStandard Format|The `Standard Format` attribute specifies the standard format that you want to use.\n1000Character|The `1000Character` attribute specifies the character that separates groups of thousands in the integer part of the value. The `1000Character` attribute must be after the Integer or `Integer Thousand` field name and before the Decimals field name.\nComma|The Comma attribute specifies the character that separates the integer from the decimals. The Comma attribute must be after the Decimals field name.\nOverflow|The Overflow attribute specifies the character that's used when the formatted result exceeds the field length.\nFiller Character|The `Filler Character` indicates the character that's used to fill empty spaces.\nPrecision|The Precision attribute specifies the minimum and maximum number of decimal places.\n### FieldName values\nThe FieldName is a component that you can use to build a format expression. Depending on the data type in the field, you can choose the appropriate FieldName from this list.\nData type|FieldName values\nDecimal|Sign, Integer, Decimals, Integer Thousand\nDate|Day, Month, Month Text, Quarter, Year, Year4, Week, Week Year, Week Year4, Weekday, Weekday Text, Closing\nTime|Hours24, Hours12, Minutes, Seconds, Thousands, AM/PM, Second dec\nDateTime|Day, Month, Month Text, Quarter, Year, Year4, Week, Week Year, Week Year4, Weekday, Weekday Text, Hours24, Hours12, Minutes, Seconds, Thousands, AM/PM, Second dec Note: \"Second dec\" specifies a fraction of a second, in decimal format.\nInteger, BigInteger|Sign, Integer, Integer Thousand\nBoolean|Text, Number\nOption|Text, Number\nCode|Text\nChar|Char/Number, Char, Number\nText|Text\n#### Example\nThese examples demonstrate how to use Format:\n Choosing a standard format.\n  Use the Standard Format attribute to select one of the standard formats (these are listed at the end of this article).\n  For example, <Standard Format,5> selects Standard Format 5.\n Using a standard format with an attribute.\n  <Precision,2:3><Standard Format,0> will use Standard Format 0 and will format the data with a minimum of 2 and a maximum of 3 decimal places. See properties/devenv-decimalplaces-property. If you don't specify a precision, then the page uses the precision that is specified in the properties/devenv-decimalplaces-property of the corresponding field in the table.\n Building a format.\n  You can create your own formats using Chars (which are displayed literally), Fields (to choose specific components of a value, for example the year-part of a date) and Attributes (for example to select which character to use as a filler).\n  For example, a field that's based on a source expression of the Date data type can use the following format string:\n  \\<Weekday Text>, \\<Month Text> \\<Day>\n  This expression displays the date as Monday, April 15.\n> NOTE\n> The settings that are specified under the Regional and Language Options in Windows determine how some separators are displayed. In the Business Central client, you can specify a Region under Settings, this determines how thousand and decimal separators are displayed.\n## Standard decimal formats\nThis table shows the standard Decimal formats with the regional setting of a European country/region.\nEurope Decimal|Format|Example\n\\<Sign>\\<Integer Thousand>\\<Decimals>|0|-76.543,21\n\\<Sign>\\<Integer>\\<Decimals>|1|-76543,21\n\\<Sign>\\<Integer>\\<Decimals>\\<Comma,.>|2|-76543.21\n\\<Integer Thousand>\\<Decimals>\\<Sign,1>|3|76.543,21-\n\\<Integer>\\<Decimals>\\<Sign,1>|4|76543,21-\n\\<XML format>|9|-76543.21\nThe following table shows the standard Decimal formats with the regional setting of English \\(US\\).\nUS Decimal|Format|Example\n\\<Sign>\\<Integer Thousand>\\<Decimals>|0|-76,543.21\n\\<Sign>\\<Integer>\\<Decimals>|1|-76543.21\n\\<Sign>\\<Integer>\\<Decimals>|2|-76543.21\n\\<Integer Thousand>\\<Decimals>\\<Sign,1>|3|76,543.21-\n\\<Integer>\\<Decimals>\\<Sign,1>|4|76543.21-\n\\<XML format>|9|-76543.21\n## Standard date formats\nThe following table shows the standard Date formats with the regional setting of a European country/region.\nEurope Date|Format|Example\n\\<Closing>\\<Day,2>-\\<Month,2>-\\<Year>|0|05-04-21\n\\<Closing>\\<Day,2>-\\<Month,2>-\\<Year>|1|05-04-21\n\\<Day,2>\\<Month,2>\\<Year>\\<Closing>D|2|050421D\n\\<Closing>\\<Year>-\\<Month,2>-\\<Day,2>|3|21-04-05\n\\<Closing>\\<Day>. \\<Month Text> \\<Year4>|4|5. April 2021\n\\<Closing>\\<Day,2>\\<Month,2>\\<Year>|5|050421\n\\<Closing>\\<Year>\\<Month,2>\\<Day,2>|6|210405\n\\<Day,2>\\<Filler Character, >. \\<Month Text,3> \\<Year4>|7|5. Apr 2021\n\\<XML format>|9|2021-04-05\nThe following table shows the standard Date formats with the regional setting of English \\(US\\).\nUS Date|Format|Example\n\\<Closing>\\<Month,2>/\\<Day,2>/\\<Year>|0|04/05/21\n\\<Closing>\\<Month,2>/\\<Day,2>/\\<Year>|1|04/05/21\n\\<Month,2>\\<Day,2>\\<Year>\\<Closing>D|2|040521D\n\\<Closing>\\<Year>/\\<Month,2>/\\<Day,2>|3|21/04/05\n\\<Month Text> \\<Closing>\\<Day>, \\<Year4>|4|April 5, 2021\n\\<Closing>\\<Month,2>\\<Day,2>\\<Year>|5|040521\n\\<Closing>\\<Year>\\<Month,2>\\<Day,2>|6|210405\n\\<Day,2>\\<Filler Character, >. \\<Month Text,3> \\<Year4>|7|5. Apr 2021\n\\<XML format>|9|2021-04-05\n## Standard time formats\nThe following table shows the standard Time formats with the regional setting of a European country/region.\nEurope Time|Format|Example\n\\<Hours24>.\\<Minutes,2>.\\<Seconds,2>|0|4.35.55\n\\<Hours24>.\\<Minutes,2>.\\<Seconds,2>\\<Second dec.>|1|4.35.55.553\n\\<Hours24,2>\\<Filler Character,0>\\<Minutes,2>\\<Seconds,2> \\<Second dec.>\\<Comma,.>T|2|043555.553T\n\\<XML format>|9|04:35:55.553\nThe following table shows the standard Time formats with the regional setting of English \\(US\\).\nUS Time|Format|Example\n\\<Hours12>:\\<Minutes,2>:\\<Seconds,2>\\<Second dec.> \\<AM/PM>|0|4:35:55 AM\n\\<Hours12>:\\<Minutes,2>:\\<Seconds,2>\\<Second dec.> \\<AM/PM>|1|4:35:55.553 AM\n\\<Hours24,2>\\<Filler Character,0>\\<Minutes,2>\\<Seconds,2> \\<Second dec.>T|2|043555 .553T\n\\<XML format>|9|04:35:55.553\n## Standard dateTime formats\nThe following table shows the standard DateTime formats with the regional setting of a European country/region.\nEurope DateTime|Format|Example\n\\<Day,2>-\\<Month,2>-\\<Year> \\<Hours24,2>.\\<Minutes,2>|0|05-04-21 04:35\n\\<Day,2>-\\<Month,2>-\\<Year> \\<Hours24,2>.\\<Minutes,2>.\\<Seconds,2>\\<Second dec>|1|05-04-21 04:35:55,553\n\\<Day,2>-\\<Month,2>-\\<Year> \\<Hours24,2>.\\<Minutes,2>|2|05-04-21 04:35\n\\<Day,2>-\\<Month,2>-\\<Year> \\<Hours24,2>.\\<Minutes,2>.\\<Seconds,2>|3|05-04-21 04:35:55\n\\<XML format> Warning: A DateTime is stored in the database as Coordinated Universal Time \\(UTC\\). For example, on a computer in the \\(UTC+01:00\\) Brussels, Copenhagen, Madrid, Paris time zone, UTC is one hour earlier than local time on the computer and probably two hours earlier during summer time.|9|2021-04-05T03:35:55.553Z\nThe following table shows the standard DateTime formats with the regional setting of English \\(US\\).\nUS DateTime|Format|Example\n\\<Month,2>/\\<Day,2>/\\<Year> \\<Hours12,2>:\\<Minutes,2> \\<AM/PM>|0|04/05/21 04:35 AM\n\\<Month,2>/\\<Day,2>/\\<Year> \\<Hours12,2>:\\<Minutes,2>:\\<Seconds,2>\\<Second dec> \\<AM/PM>|1|04/05/21 04:35:55.553 AM\n\\<Month,2>/\\<Day,2>/\\<Year> \\<Hours12,2>:\\<Minutes,2> \\<AM/PM>|2|04/05/21 04:35 AM\n\\<Month,2>/\\<Day,2>/\\<Year> \\<Hours12,2>:\\<Minutes,2>:\\<Seconds,2> \\<AM/PM>|3|04/05/21 04:35:55 AM\n\\<XML format> Warning: A DateTime is stored in the database as Coordinated Universal Time \\(UTC\\). For example, on a computer in the \\(UTC-08:00\\) Pacific Time zone, UTC is eight hours later than local time on the computer.|9|2021-04-05T12:35:55.553Z\n## Standard integer formats\nInteger and BigInteger|Format|Example\n\\<Sign>\\<Integer>|0|-567\n\\<Sign>\\<Integer>|1|-567\n\\<Sign>\\<Integer>|2|-567\n\\<XML format>|9|-567\n## Standard boolean formats\nBoolean|Format|Example\n\\<Text>|0|True/False\n\\<Text>|1|True/False\n\\<Number>|2|1/0\n\\<XML format>|9|true/false\n## Standard GUID formats\nGUID|Format|Example\n{<4byte>-<2byte>-<2byte>-<2byte>-<6byte>}|0|{EA48A3E0-48E0-4AB7-B1A1-E3EA85BF1B75}\n{<4byte>-<2byte>-<2byte>-<2byte>-<6byte>}|1|{EA48A3E0-48E0-4AB7-B1A1-E3EA85BF1B75}\n{<4byte>-<2byte>-<2byte>-<2byte>-<6byte>}|2|{EA48A3E0-48E0-4AB7-B1A1-E3EA85BF1B75}\n<16byte>|3|EA48A3E048E04AB7B1A1E3EA85BF1B75\n<4byte>-<2byte>-<2byte>-<2byte>-<6byte>|4|EA48A3E0-48E0-4AB7-B1A1-E3EA85BF1B75\n(<4byte>-<2byte>-<2byte>-<2byte>-<6byte>)|5|(EA48A3E0-48E0-4AB7-B1A1-E3EA85BF1B75)\n{0X<4byte>,0X<2byte>,0X<2byte>,{0X<1byte>,0X<1byte>,0X<1byte>,0X<1byte>,<br/>0X<1byte>,0X<1byte>,0X<1byte>,0X<1byte>}}|6|{0XEA48A3E0,0X48E0,0X4AB7,{0XB1,0XA1,0XE3,0XEA,0X85,0XBF,0X1B,0X75}}\n\\<XML format>|9|{EA48A3E0-48E0-4AB7-B1A1-E3EA85BF1B75}\n## Standard enum formats\nEnum value|Format|Example\n\\<Text>|0|Bronze\n\\<Text>|1|Bronze\n\\<Number>|2|1\n\\<XML format>|9|1\n## Standard option formats\nOption|Format|Example\n\\<Text>|0|Blue\n\\<Text>|1|Blue\n\\<Number>|2|1\n\\<XML format>|9|1\n## Standard XML and string formats\nStandard format `9` is used to display the data in the standard XML formats.\nFor Chars, all formats should resemble the following: <Char/Number>.\nFor Text and Code, all formats should resemble the following: \\<Text>.\n## Related information\nproperties/devenv-autoformattype-property\nproperties/devenv-autoformatexpression-property\nproperties/devenv-formatevaluate-property\nproperties/devenv-decimalplaces-property\nAbout dates in Business Central<devenv-about-dates>"}