Solved

convert decimal in vb.net

Posted on 2015-02-10
1
118 Views
Last Modified: 2015-02-10
Is it possible to convert decimal value from 0.2625502370637121681198235265D to 26.25 this decimal format?
0
Comment
Question by:VBdotnet2005
1 Comment
 
LVL 35

Accepted Solution

by:
Miguel Oz earned 500 total points
ID: 40601812
One possible solution:
decimalVar = 0.2625502370637121681198235265 * 100;
decimal newValue= Convert.ToDecimal(decimalVar.ToString ("#.##"));

Open in new window


Another option is to use the Decimal.Round Method after you multiplied by 100.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
HttpPostedFile 1 26
Help with adding DLL file in Windows project 20 28
Convert datetime to time string 10 19
tableview is not updating 1 7
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question