Link to home
Start Free TrialLog in
Avatar of baabaa_nl
baabaa_nlFlag for United Kingdom of Great Britain and Northern Ireland

asked on

VB.Net: String or Double to Currency Format

Hi Experts,

I need to convert a double or a string into currency. What is the best method to convert the values that are in a string or in a double  to currency format(Euro with two decimal places).

Also the values should looks like this for example:   €18.025.785,12  

I am very sure that the users using this applications are only use to the above currency format, the decimal points separated with a comma ',' rather than a regular period '.', and the excess digits are separated with a period rather than a comma.

I need this because when I read the currency values from the database I want to make sure that it is represented on the above format on the ListView, DataGridView and Forms.

Also when I send the currency that looks like €108,10 to an Access Database using an SQL statement from a VB.Net application, do I have to convert that to a string or just extract it as a double and set it to the SQL statement?

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of nepaluz
nepaluz
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial