Formatting dates and numbers in JavaScript expressions
When using dates and numbers in JavaScript expressions, you often need formatting to get the desired result. The CurrReport.DotNetFormat function is helpful here, because it uses the .net format library, which can format almost everything:
CurrReport.DotNetFormat(<value>,'<dotnetformatstring>’)
CurrReport.DotNetFormat(<value>,'<dotnetformatstring>’,<languageid>) – formats a value using a .net format string using the current language or a specific language.
To get an overview of how to specify the dotnetformatstring, take a look here: Overview: How to format numbers, dates, enums, and other types in .NET | Microsoft Learn
Latest news
Latest knowledge base articles
-
Mapping from Business Central documents to ZUGFeRD and XRechnung
-
Using native Business Central ZUGFeRD generation with FORNAV reports
-
Repeater tables and barcodes in the ForNAV Template Editor
-
Controlling report language, format region, copies, and watermark with the Report Settings page
-
Use AI agents to query Fornav reports via the Business Central MCP Server
