This topic is locked

digits after coma

5/12/2004 3:43:45 AM
ASPRunnerPro General questions
A
awl author

I have the problem with digits after coma. My ASP code is built based on Access with tables linked to SQL and looks like this.
<%

if IsBinaryField(rsData.Fields("SumazWartoscReorderLevel")) then

Response.Write CreateImageControl(rsData, "SumazWartoscReorderLevel")

else

Response.Write ProcessLargeText(GetData(rsData.Fields("SumazWartoscReorderLevel"), ""))

end if

%>
How to limit dgits after coma to 2.

Limitation in Access doesn't work.
kind regards,
Adam.

Sergey Kornilov admin 5/12/2004

Adam,
you can use the following code for this purpose:

<%

Response.Write FormatNumber(GetData(rsData.Fields("SumazWartoscReorderLevel"), ""),2)
%>

A
awl author 5/13/2004

Yes Sergey,
It works, thank you.
Adam.

A
awl author 5/14/2004

I've one more problem regarding the matter. Data are exported to Excel in wrong way. E.g. the number 9500,88 (on the web page) in Ms Excel looks like this 950 088 399 999 999 but in Ms Word looks like this 9500,88399999999. What can be cause of that?
kind regards,
Adam Wolf