THIS WAS RESOLVED. (Topic 9393)
I have a snippet of VBA that I'd like to see how I would convert to VBS for ASPRunner.
I am new to VB and ASP, so I'm a bit lost with this.
What would a function like this look like in ASP?
Public Function DegToMinSec(DecDeg)
' Converts position field from decimal degrees to degrees.minutesseconds
' specified as degmmss ( (e.g., converts 36.97611 to 365834 )
xDecDeg = Abs(DecDeg)
Ideg = Int(xDecDeg)
Decim = xDecDeg - Ideg
imin = Int(Decim 60)
isec = Int((Decim 60 - imin) 60 + 0.5)
DegToMinSec = Ideg 10000 + imin * 100 + isec
End Function
Let's say the input field is Decimal Latitude and the output will be to
the field Degrees Latitude. These fields need to perform the calculation automatically
whenever an entry occurs. Or in the case of the edit page, whenever a changed value occurs.
I'm confused and could use some guidance with this, so I can convert the rest of the functions.
Thanks a lot.
-Pat