Formatting Strings in AssetCenter 3.6
Formatting Strings in AssetCenter 3.6
(OP)
I have the following calculation which returns 567.9099393
Set [FV_ClientBuy] = cDbl([Product.mPrice]/(1-0.7))
I would like to know if there is a function that will allow me to round this number to 2 decimal places.
I am trying to populate a string field, and it needs to be a string for other reasons.
Thanks in advance
Set [FV_ClientBuy] = cDbl([Product.mPrice]/(1-0.7))
I would like to know if there is a function that will allow me to round this number to 2 decimal places.
I am trying to populate a string field, and it needs to be a string for other reasons.
Thanks in advance
RE: Formatting Strings in AssetCenter 3.6
Try This
<-------------------- Cut Here
Function amRoundUp(ByVal dNum as Double) as Double
Dim lErr as Long
Dim holeNo as String, Digit as String, Remain as String, twoDigit as String
Dim dNumber as Double
holeNo = LeftPart(CStr(dNum),".",0)
Remain = RightPartFromLeft(CStr(dNum),".",0)
Digit = Mid(Remain,3,1)
twoDigit = Mid(Remain,1,2)
If Digit > 4 Then
dNumber = CDbl(holeNo &"."& twoDigit) + 0.01
Else
dNumber = CDbl(holeNo &"."& twoDigit)
End If
amRoundUp = dNumber
End Function
<------- End Cut
Jason Thomas
AssetCenter Consultant
www.corviz.com