Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Convert string "$0.67" to Number "0.67"

Convert string "$0.67" to Number "0.67"

Scheduled Pinned Locked Moved Visual Basic
com
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Khatri Mitesh
    wrote on last edited by
    #1

    Hi I want to convert a string that is "$0.67" to number format("0.67") how i convert this. mainly i have a values with $ sign and i want to remove this $ from the string. Please suggest how i do this. Thanks Mitesh

    ~Khatri Mitesh khatrimitesh@hotmail.com Bikaner (Rajasthan) INDIA

    L C G 3 Replies Last reply
    0
    • K Khatri Mitesh

      Hi I want to convert a string that is "$0.67" to number format("0.67") how i convert this. mainly i have a values with $ sign and i want to remove this $ from the string. Please suggest how i do this. Thanks Mitesh

      ~Khatri Mitesh khatrimitesh@hotmail.com Bikaner (Rajasthan) INDIA

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Click[^]

      1 Reply Last reply
      0
      • K Khatri Mitesh

        Hi I want to convert a string that is "$0.67" to number format("0.67") how i convert this. mainly i have a values with $ sign and i want to remove this $ from the string. Please suggest how i do this. Thanks Mitesh

        ~Khatri Mitesh khatrimitesh@hotmail.com Bikaner (Rajasthan) INDIA

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        The Replace method on the string class can replace the $ with an empty string. Then you can use double.TryParse.

        Christian Graus Driven to the arms of OSX by Vista.

        1 Reply Last reply
        0
        • K Khatri Mitesh

          Hi I want to convert a string that is "$0.67" to number format("0.67") how i convert this. mainly i have a values with $ sign and i want to remove this $ from the string. Please suggest how i do this. Thanks Mitesh

          ~Khatri Mitesh khatrimitesh@hotmail.com Bikaner (Rajasthan) INDIA

          G Offline
          G Offline
          Gideon Engelberth
          wrote on last edited by
          #4

          Along with the other suggestions, you could try Double.Parse with the overload that takes a System.Globalization.NumberStyles and choose AllowCurrencySymbol. If you care about working for other currencies than just $, this may be your best bet.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups