Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

declare a decimal integer with only 2 digits after the .

Posted on 2007-03-27
4
Medium Priority
?
549 Views
Last Modified: 2008-02-01
Hi Im looking to declare a decimal integer with only 2 digits after the .
0
Comment
Question by:mairtinobrian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 28

Expert Comment

by:mmarinov
ID: 18799226
Hello mairtinobrian,

What do you mean by declare? declare a variable or just use the 2 digit rule when visualize it?

Regards,
mmarinov
0
 

Author Comment

by:mairtinobrian
ID: 18799319
Hi Im converting  a bunch of currencies so for example converting $1 to some currency with an exchange rate of .0000234  $1 / .000234 = 4273.504274  I want to display this value to 2 places of decimal  4273.50
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 1500 total points
ID: 18799591
you can use the ToString method: (1 / .000234).Tostring("#,##0.00")
0
 

Author Comment

by:mairtinobrian
ID: 18799857
Excellent thanks emoreau:
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

670 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