Go Back   CodingForums.com > :: Server side development > MySQL > Other Databases

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-17-2007, 04:23 AM   PM User | #1
efeller
New Coder

 
Join Date: Oct 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
efeller is an unknown quantity at this point
MSSQL formatting money field

I have a money field in a MSSQL database. When I enter a price of 10.50, it formats to 10.5

When I run a query to display this on an asp page it displays 10.5 instead of 10.50

How can I get it to display 10.50?
efeller is offline   Reply With Quote
Old 02-19-2007, 06:57 PM   PM User | #2
mehere
Regular Coder

 
Join Date: Jan 2005
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
mehere is an unknown quantity at this point
either use FormatNumber or FormatCurrency if you want dollar signs
Code:
FormatNumber(field_name,2) or FormatCurrencty(field_name)
mehere is offline   Reply With Quote
Old 02-22-2007, 09:39 PM   PM User | #3
efeller
New Coder

 
Join Date: Oct 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
efeller is an unknown quantity at this point
Thank you! It worked perfectly! Much appreciated!
efeller is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:43 AM.


Advertisement
Log in to turn off these ads.