PDA

Click to See Complete Forum and Search --> : Format() Function in ASP


Sep 6th, 2000, 08:39 AM
Does the Format() function work in ASP?

I've got:<%=Format(dTotal, "0.00") %>

dTotal is a variant but will contain money (double) values.
So, dTotal might contain 2.5 and I'd like the Format() function to return "2.50" or it might contain 2351.101 and I'd want the Format() function to return "2351.10" and I'd tag a "£" sign on the front.

For some reason, everytime I try to use it I just getMicrosoft VBScript runtime error '800a000d'

Type mismatch: 'Format'

/stu/placeorder.asp, line 241

Ianpbaker
Sep 6th, 2000, 09:07 AM
Hi matthewralston

use the FormatCurrency function to do what you ask


FormatCurrency(expression,[numofdiggitsafterdecimal],[includeleadingdiggit],[useparensfornegnums],[groupdigits])


Hope it helps

Ian

Sep 6th, 2000, 09:30 AM
Ta. :)