Jon_G
(Jon G)
September 9, 2020, 7:11am
1
Probably a simple question but I’m stuck on this…
I have a lookup which returns a GenericValue variable value of “468”.
How can I convert “468” into a string as “$468.00” ?
also, I would need to ensure that it is capable of handling thousands etc… like “1200” would be “$1,200.00” and “12000” would be “$12,000.00” etc.
Thanks!
Sasi.lalo
(Sasikumar)
September 9, 2020, 8:15am
2
Hi @Jon_G ,
Try this:
string.Format(“${0:#.00}”, Convert.ToDecimal(YourVariable.ToString))
ppr
(Peter Preuss)
September 9, 2020, 8:41am
3
@Jon_G
give a try on the format value activity:
1 Like
Jon_G
(Jon G)
September 10, 2020, 5:04am
4
Thanks so much for both these suggestions,
I managed to solve it using:
stringvariable.ToDecimal(system.globalization.cultureinfo.invariantculture).ToString(“$#,##0 .00;-$#,##0 .00”)
But I had no idea Format Value activity existed - in future I will try this instead!
1 Like
system
(system)
Closed
September 13, 2020, 5:04am
5
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.