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