Skip to main content
Newcomer
November 14, 2022
Solved

Format output of confirmation rule

  • November 14, 2022
  • 2 replies
  • 0 views

Hi

I am getting some large numbers out of my confirmation rules and I am looking for ways to format the output so it is easier to read. Preferably commas between the thousands, millions, billions... etc but would also like to know what other formatting options are available as well.

 

Currently my output is the below and I am trying to make the 'math.Round(Acc1,2)' part easier to read.

SimonEx_0-1668460293883.png

 

Does anyone know of a resource that lists the different formatting options? 

Or just how to add the comma seperators?

 

Thanks

Simon

Best answer by Koemets

I think what are you looking for is this:

"A#MCF0015050_PLG = " & Acc1.ToString("#,###.00")

Here is the decent read on formatting:

https://www.thevbprogrammer.com/VB2010_04/04-01-FormattingNumbersDateStrings.htm

It's written infinitely better than Microsoft Learn article on formatting 🙂

2 replies

KoemetsAnswer
Newcomer
November 15, 2022

I think what are you looking for is this:

"A#MCF0015050_PLG = " & Acc1.ToString("#,###.00")

Here is the decent read on formatting:

https://www.thevbprogrammer.com/VB2010_04/04-01-FormattingNumbersDateStrings.htm

It's written infinitely better than Microsoft Learn article on formatting 🙂

SimonExAuthor
Newcomer
November 15, 2022

Thanks that is exactly what I was after.

SimonEx_0-1668498021201.png

No more counting zeros ðŸ˜€

OneStream Employee
November 15, 2022

Hi, this returns the string depending on the culture settings of the individual user. 

XXX.ToString(cultureInfo.InvariantCulture))

Here is some information on culture and strings:

https://learn.microsoft.com/en-us/dotnet/visual-basic/programming-guide/language-features/strings/how-culture-affects-strings