• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 198
  • Last Modified:

formatting currency

Hi

How do i format a decimal value as a uk currency with 2 decimal places and a £ sign

thanks
andrea
0
andieje
Asked:
andieje
2 Solutions
 
Kinger247Commented:
andieje try:

        Dim Price As Decimal = 9.99
        Dim s As String = String.Format("{0:c}", price)
        Console.WriteLine(s)
0
 
ZeonFlashCommented:
Here's how to get the '£' sign using CultureInfo:

            Dim objCulture As New System.Globalization.CultureInfo("en-GB", False)
            Dim myVal As Decimal = 2.4

            MessageBox.Show(myVal.ToString("c", objCulture))  'Result will be:  £2.40
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now