Results 1 to 20 of 20

Thread: Decimal Formatting Help

Hybrid View

  1. #1
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Decimal Formatting Help

    Quote Originally Posted by Dragnorian View Post
    Yes I know that I Need to tighten up on it.
    Pretty much everyone does to begin with. I think that it's often because data goes into and out of a console application as text and VB in particular can be quite forgiving in many cases, performing implicit conversions much of the time. Proper use of data types is critical to create software of any significance though.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Nov 2016
    Posts
    95

    Re: Decimal Formatting Help

    Yeah, I will be working on that. Thank you again for the help!

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2016
    Posts
    95

    Re: Decimal Formatting Help

    .,/'

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Nov 2016
    Posts
    95

    Re: Decimal Formatting Help

    That whole formatting issue was because the user can predetermine a set increment value that I have defined in the code but what about a custom increment value that the user defines, not me? I thought doing something like .ToString("n#") would work but no. I need something to figure out how it can calculate if the custom value is either an integer or a decimal number then figure out if decimal, how many places it should go to then do the same basic format as the .ToString("n1") does. Is this possible in Visual Basic?.

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width