View Single Post
  #1 (permalink)  
Old May 12th, 2006, 09:17 AM
kwilliams kwilliams is offline
Banned
 
Join Date: Jul 2005
Posts: 317
Thanks: 0
Thanked 0 Times in 0 Posts
Default FormatCurrency Function Question

I'm new to this, so please bear with me. I'm trying to use the FormatCurrency Function to format a number located in a SQL Server 2k DB table. But I'm having a problem in defining the rules for the number. Basically, the number in the DB is "180792" (without quotes), and I want it transfered to "$1807.92". But my setup of this method is returning "$180,792".

Here's more details on what I'm using, and what I'm trying to do:

ORIGINAL DB VALUE:
180792

CURRENT CODE:
Dim strNumber As String = Trim(rsQuery("Number").Value.ToString)
strNumber = (FormatCurrency(strNumber,0))

CURRENT RESULT:
$180,792

WANTED RESULT:
$1,807.92

I hope that someone can help me out with this one. I'm just not sure if this method has too many limitations that I can't use, or if I'm just not adding another few steps. Any and all help is appreciated. Thanks.

KWilliams
Reply With Quote