We can check the variable type by using TypeName. To change from one type to other we can use different functions.
Expression to Integer by Cint
If the last line is changed by using Cdbl then output will be like this
Response.Write "Type of " & typename(v1)
Response.Write Cint(v1) ' Output will be 5
Response.Write Cdbl(v1) ' Output will be 5.43
To change expression to date value
Response.Write Cdate("01-11-2010") ' Ouput 1/11/2010
This article is written by plus2net.com team.
Be the first to post comment on this article :