Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formatcurrency for international values

Status
Not open for further replies.
Nov 29, 2002
64
US
Hello there, can I format the number retrieved from a database with the formatcurrency function so it gives me a different currency than the one in the server?

I get : $20,000.00 and I need Bs. 20.000,00

Thanks in advance for your help in this matter.
Alfredo
 
I am afraid not - FormatCurrency returns the currency set on the servers regional settings.

You could use FormatNumber to get the correct number of decimal places and apply the currency manually.

----------------------------
SnaveBelac - Adventurer
----------------------------
 
well, found it on another post :p :

myFormattedValue = "Bs" & formatNumber(myValue, 2)

Now, is it there a way to align the currency symbol depending on the value? For example:

Bs. 100.000,00
Bs. 1.100.000,00

so that it places the neccessary spaces between the currency symbol and the value depending on the value (hundreds, thousands, millions)

Thanks again!!

Alfredo
 
If possible, place the currency symbol in one data cell and the number in the adjacent cell - align them both to the right and you should be all set.

Code:
<table ...>
  <tr>
    <td align="right">Bs.</td>
    <td align="right">1,000,000</td>
  </tr>
  <tr>
    <td align="right">Bs.</td>
    <td align="right">1,000</td>
  </tr>
</table>

----------------------------
SnaveBelac - Adventurer
----------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top