469,950 Members | 1,934 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,950 developers. It's quick & easy.

Convert integer to decimal ?

Hello everyone,

Please can someone help me, i want to convert int number to decimal
but as this way:
00000005465 to 54.65
Note: i don't want 5465.00

so is there any code can do this or should i have to write special code.

Thanks for your help.
Nov 15 '07 #1
1 2180
On Nov 15, 1:17 pm, tvin <t...@discussions.microsoft.comwrote:
Hello everyone,

Please can someone help me, i want to convert int number to decimal
but as this way:
00000005465 to 54.65
Note: i don't want 5465.00

so is there any code can do this or should i have to write special code.
Well, what are the specific requirements here? How should it know how
many decimal places to use? Is it always 2 decimal places? If so, just
use:

int i = 5465;
decimal d = ((decimal)i)/100;

Jon
Nov 15 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Sam Smith | last post: by
7 posts views Thread by Philipp H. Mohr | last post: by
3 posts views Thread by Gospill | last post: by
7 posts views Thread by elliotng.ee | last post: by
6 posts views Thread by sweeet_addiction16 | last post: by
10 posts views Thread by cmdolcet69 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.