Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
THE WORLD'S LARGEST WEB DEVELOPER SITE

VBScript CSng Function

❮ Complete VBScript Reference

The CSng function converts an expression to type Single.

The expression must be a numeric value.

Syntax

CSng(expression)
Parameter Description
expression Required. Any valid expression

Example

Example

<%

response.write(CSng("300000") & "<br />")
response.write(CSng(1536.75263541) & "<br />")
response.write(CSng(-6700000) & "<br />")

%>

The output of the code above will be:

300000
1536.753
-6700000
Show Example »

❮ Complete VBScript Reference