Results 1 to 2 of 2

Thread: round

  1. #1
    Join Date
    Mar 2004
    Posts
    128

    Unanswered: round

    Hi all,
    I have a query that has double values. in the query field I wrote
    Round (field,2) to round the result to 2 digit places after the point.
    The query doesn't do that.
    e.g: round(x,2) ---> round (0.23564,2)=0.23
    the query gives 0.23564
    thanks

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Lightbulb

    You can write your own round function for example AccRound
    Call as AccRound(21.2368, 2) wii result in > 21.24
    PHP Code:
    Function AccRound(anyNumnDigits) As Variant
      AccRound 
    = (Int((anyNum 0.5 10 nDigits) * 10 nDigits) / 10 nDigits)
    End Function 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •