I need to convert a char(17) to numeric for a MSSQL view. In VB it goes like this
If PartType <> "" Then
mantissa = CInt(Mid(SideMillType, 5, 2))
num = CInt(Mid(SideMillType, 7, 2))
den = CInt(Mid(SideMillType, 9, 2))
Width = CDbl(mantissa + (num / den))
End If
WidthFromPartType = Width '42.625
'SideMillType record: B166420508N
Ive tried a few different things, but not having much luck. How do I convert B166420508N to be 42.625?
Thankx in advance...
If PartType <> "" Then
mantissa = CInt(Mid(SideMillType, 5, 2))
num = CInt(Mid(SideMillType, 7, 2))
den = CInt(Mid(SideMillType, 9, 2))
Width = CDbl(mantissa + (num / den))
End If
WidthFromPartType = Width '42.625
'SideMillType record: B166420508N
Ive tried a few different things, but not having much luck. How do I convert B166420508N to be 42.625?
Thankx in advance...