Separating thousands

asemnor

Member
Joined
Sep 26, 2005
Messages
8
Location
Accra, Ghana
Programming Experience
3-5
I want to be able to use the comma (,) to separate thousands and aperiod for decimal points and keep the decimal at two as in 120,000.23 in a variable declared as decimal. Can anyone help?
Thank you
 
Such formats is a culture thing, there is probably a culture in your mind for this. Here is example using the US culture and output the Double as String in standard Number format:
VB.NET:
Dim d As Double = 120000.23
Dim number As String = d.ToString("N", New Globalization.CultureInfo("en-US", False))
MsgBox(number)
 
Thank you John

Thank you JohnH for your help. But I have another little problem. After editing some data, I can't update it to the Access database I'm using as a backend to my application. Please help.
 
Back
Top