Val2

Converts anything into an integer
I used the function VAL() a lot, it is in VB6 and VBA inside Excel.
But in CLassic ASP, there is no equivelant to it, so I thought it is time for me to have one.
Here is Val2(), an equivalent to VAL() in Classic ASP

CodeFunctionName
What is this?

Public

Tested

Original Work
Function Val2(AnyString)
Rett = 0
If AnyString > "" Then
If IsNumeric(AnyString) Then
Rett = Cint(AnyString)
End If
End If
Val2 = Rett
End Function

AnyString

Views 2,809

Downloads 1,057

CodeID
DB ID