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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

currency with zeros

Status
Not open for further replies.

99mel

Programmer
Oct 18, 1999
379
GB
I have a variable declared as currency.

However if i set it to 2.50 for example it displayes 2.5

Is there a simple function to give 2 integers after the decimal point
 
try the format$ function

eg format(amount,"0.00")
 
Are you actually trying to display it as currency?

i.e something like $2.50 or £2.50?

If so, it might be advantageous to sue the format function with a slightly different format expression than that given above:

format(amount, "currency")

as this should adjust correctly for different regional settings.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top