SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Development Tools
 ASP.NET
 Number Format
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kris55
Starting Member

6 Posts

Posted - 04/19/2007 :  13:53:19  Show Profile  Reply with Quote
Hello Folks,

I have some problem with converting the number format

I am getting the out put cNumber in the format of lets say 525.50
I want to eliminate the dot and the out put should be 52550
could not able to eliminate the dot. can any one help on this
i am using VB.NET
Thx

jsmith8858
Dr. Cross Join

USA
7423 Posts

Posted - 04/19/2007 :  14:05:40  Show Profile  Visit jsmith8858's Homepage  Reply with Quote
Are you having trouble with basic multiplication? No offense, but elementary math skills are pretty important for anyone writing any programming code in any language.

To "magically transform" 525.50 to 52550 you just multiply 252.50 525.50 by 100. Do you know how to do multiplication in VB.NET ? You use the * symbol, the same way you use + to add two numbers.

If you need something else, you need to be much more specific.

edit: fixed typo, thanks Jon!

- Jeff
http://weblogs.sqlteam.com/JeffS

Edited by - jsmith8858 on 04/19/2007 16:30:56
Go to Top of Page

kris55
Starting Member

6 Posts

Posted - 04/19/2007 :  14:29:40  Show Profile  Reply with Quote
quote:
Originally posted by jsmith8858

Are you having trouble with basic multiplication? No offense, but elementary math skills are pretty important for anyone writing any programming code in any language.

To "magically transform" 525.50 to 52550 you just multiply 252.50 by 100. Do you know how to do multiplication in VB.NET ? You use the * symbol, the same way you use + to add two numbers.

If you need something else, you need to be much more specific.

- Jeff
http://weblogs.sqlteam.com/JeffS




Hello Sir,
I know this basic thing. But in my sql table the data type is money. I tried dividing by 100 but it didn't do it
Go to Top of Page

jsmith8858
Dr. Cross Join

USA
7423 Posts

Posted - 04/19/2007 :  15:19:23  Show Profile  Visit jsmith8858's Homepage  Reply with Quote
You need to MULTIPLY it by 100. Not divide. MULTIPLY. That is the OPPOSITE of divide.

- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page

jhermiz
Flowing Fount of Yak Knowledge

USA
3564 Posts

Posted - 04/19/2007 :  16:08:49  Show Profile  Visit jhermiz's Homepage  Reply with Quote
quote:
Originally posted by jsmith8858

Are you having trouble with basic multiplication? No offense, but elementary math skills are pretty important for anyone writing any programming code in any language.

To "magically transform" 525.50 to 52550 you just multiply 252.50 by 100. Do you know how to do multiplication in VB.NET ? You use the * symbol, the same way you use + to add two numbers.

If you need something else, you need to be much more specific.

- Jeff
http://weblogs.sqlteam.com/JeffS




I cant help but to laugh at that Jeff.
Since when was 252.50 * 100 = 52550

Let me guess: Typo


Programmers HowTo's -- http://jhermiz.googlepages.com
Go to Top of Page

jsmith8858
Dr. Cross Join

USA
7423 Posts

Posted - 04/19/2007 :  16:30:07  Show Profile  Visit jsmith8858's Homepage  Reply with Quote
hehe, yeah, typo! Good catch!!!!

- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000