Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 103
  • Last Modified:

VB.Net - Format Value with Decimal

Good Day Experts!

I am hoping you can help with a good way to achieve my results.  I have values that I want to insert a decimal point at the end.  For example, 45634 I would like to have 456.34. The variable holding 45634 is decimal.  

Is there an "easy" to put a decimal point in front of the 34? Or do I have to convert to a string and parse apart and then put it back together?

Thanks,
jimbo99999
0
Jimbo99999
Asked:
Jimbo99999
  • 2
1 Solution
 
Paul MacDonaldDirector, Information SystemsCommented:
You can just do something like...

Dim decValue as Decimal = CDec(45634) / 100

...and you can replace '45634' with a variable.  This will work as long as the last two digits are always after the decimal point.
0
 
Jimbo99999Author Commented:
Thanks for replying...I will try it!
0
 
Jimbo99999Author Commented:
Works great!

Thanks again for the help,
jimbo99999
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now