+ Reply to Thread
Results 1 to 2 of 2

Thread: Trim character from string

  1. #1
    Junior Member
    Join Date
    Jun 2012
    Posts
    15

    Trim character from string

    I have decimal variable it has value
    3.20
    2.25
    How can I convert it into string so I can get
    3.2
    2.25
    Issue is 3.20 must be 3.2 in string.

  2. #2
    Junior Member
    Join Date
    Jun 2012
    Posts
    10
    String.Format("{0:0.##}", 2.50);
    You can also convert it to a string and then do String.Trim('0'); to trim the trailing zeros off.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts