{"title":"System.Format(Any [, Integer] [, Integer]) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/system/system-format-joker-integer-integer-method/","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/methods-auto/system/system-format-joker-integer-integer-method, 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/methods-auto/system/system-format-joker-integer-integer-method","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":"Formats a value into a string.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"System.Format(Any [, Integer] [, Integer]) Method","slug":"systemformatany-integer-integer-method","at":0,"chars":1583},{"level":2,"title":"Syntax","slug":"syntax","at":143,"chars":179},{"level":2,"title":"Parameters","slug":"parameters","at":322,"chars":605},{"level":2,"title":"Return Value","slug":"return-value","at":927,"chars":52},{"level":2,"title":"Remarks","slug":"remarks","at":979,"chars":470},{"level":2,"title":"Related information","slug":"related-information","at":1449,"chars":134}],"text":"# System.Format(Any [, Integer] [, Integer]) Method\n> Version: _Available or changed with runtime version 1.0._\nFormats a value into a string.\n## Syntax\n```al\nString :=   System.Format(Value: Any [, Length: Integer] [, FormatNumber: Integer])\n```\n> NOTE\n> This method can be invoked without specifying the data type name.\n## Parameters\nValue\nType: ../any/any-data-type\nThis is an AL variable (expression) of any simple data type, such as Option, Integer, BigInteger, Decimal, Char, Text, Code, Date, Time, DateTime, Boolean, or GUID. If, when the system formats Value, the result is a value larger than the maximum length MAXSTRLEN method (Code, Text) of String, a run-time error occurs.\n*[Optional] Length*\nType: ../integer/integer-data-type\nThis optional parameter specifies the length of String.\n*[Optional] FormatNumber*\nType: ../integer/integer-data-type\nThis optional parameter specifies the format that you want to use.\n## Return Value\nString\nType: ../text/text-data-type\n## Remarks\nThe FormatNumber parameter specifies the format that you want to use. The basic options for the Decimal data type are as follows:\n <*Sign*><*Integer Thousand*><*Decimals*> is Format 0\n <*Sign*><*Integer*><*Decimals*> is Format 1\n <*Sign*><*Integer*><*Decimals*><*Comma*,.> is Format 2\n <*Integer Thousand*><*Decimals*><*Sign,1*> is Format 3\n <*Integer*><*Decimals*><*Sign,1*> is Format 4\nSee Formatting Values, Dates, and Time<../../devenv-format-property>).\n## Related information\nsystem-data-type\nGet started with AL<../../devenv-get-started>\nDeveloping extensions<../../devenv-dev-overview>"}