dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Convert Double to Decimal while retaining format

  1. #1
    Join Date
    Oct 2006
    Posts
    1

    Question Convert Double to Decimal while retaining format

    This has been driving me crazy all day.
    I have a decimal (19.00) and I need to convert it to double
    A string will not work in this situation.

    I noticed that if the double was 19.01, then converting to double gives me 19.01,
    but when the decimal value is 19.00, I get 19 on the conversion not 19.00.

    Please help.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    12,734

    Re: Convert Double to Decimal while retaining format

    Post the code you are using to do the conversion.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)