Jump to content

FormatCurrency Function Question


kwilliams
 Share

Recommended Posts

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:180792CURRENT CODE:Dim strNumber As String = Trim(rsQuery("Number").Value.ToString)strNumber = (FormatCurrency(strNumber,0))CURRENT RESULT:$180,792WANTED RESULT:$1,807.92I 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.

Link to comment
Share on other sites

  • 4 months later...
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 transferred 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:180792CURRENT CODE:Dim strNumber As String = Trim(rsQuery("Number").Value.ToString)strNumber = (FormatCurrency(strNumber,0))CURRENT RESULT:$180,792WANTED RESULT:$1,807.92I 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.
Try something like this:
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...