VBScript Currency DataType formatting

They have: 82 posts

Joined: Oct 2001

OK Guys,

I am getting user in put from a text box.
It should be in this format:

1000.00

I am doing a CCur() on the data to do a comparison
then I get this:
1000

or if this is entered:

1000.50
I get:
1000.5

How can I format this so it will show the .00?

Thank you!!!

- Mike

Blessed is the man who fears the LORD, who delights greatly in his commandments. Psalms 112:1

Peter J. Boettcher's picture

They have: 812 posts

Joined: Feb 2000

You can use the FormatCurrency() function, it should do the trick.

eg. FormatCurrency(1000)

Will equal 1000.00

I think this depends on the regional settings of the computer that runs the script (local or server)

PJ | Are we there yet?
pjboettcher.com

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.