Andrew Paton wrote on 02 jul 2003 in
microsoft.public.inetserver.asp.general:
> Try something like
>
> <%
> decimal = 0.001
>
> pointposition = instr(decimal,".")
> noplaces = len(decimal) - pointposition
> %>
>
> This should return (well it does i tested it) a value of 3. Or however
> many decimal places there are in the variable "decimal"
>
This is where vbs InStrRev() is for
<%
decimal = 0.001
noplaces = len(decimal) - InStrRev(decimal,".")
%>
Beware, localized versions sometimes need InStrRev(decimal,",")
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
|