QTP Math functions – Check Array Type
Parent page: Service Functions – Math (QTP, VBScript)
Check whether an array consists of numeric values
Public Function isArrayNumeric(ByVal dvArray)
Dim Iter
If Not isArray(dvArray) Then
isArrayNumeric = False
Exit Function
End If
If UBound(dvArray) = -1 Then
isArrayNumeric = False
Exit Function
End If
For Iter=0 To UBound(dvArray)
If Not isNumeric(dvArray(Iter)) Then
isArrayNumeric = False
Exit Function
End If
Next
isArrayNumeric = True
End Function
Check whether an array consists of date/time values
Public Function isArrayDate(ByVal dvArray)
Dim Iter
If Not isArray(dvArray) Then
isArrayDate = False
Exit Function
End If
If UBound(dvArray) = -1 Then
isArrayDate = False
Exit Function
End If
For Iter=0 To UBound(dvArray)
If Not isDate(dvArray(Iter)) Then
isArrayDate = False
Exit Function
End If
Next
isArrayDate = True
End Function

