format number function (asp)

Results 1 to 2 of 2

Thread: format number function (asp)

  1. #1
    Join Date
    Dec 1969

    Default format number function (asp)

    Hi all.<BR>I have some calculations that are performed in a query that show results like this ie: 3.1454345 <BR>strR1A = formatnumber( (rs.Fields("r1a") *100100) )<BR>this string shows results like this ie: 3.15<BR>im looking for a result with no desimal place ie: 3<BR><BR>can someone please help?<BR>Thanks in advance<BR>Ron<BR><BR>

  2. #2
    BalletChick Guest

    Default RE: format number function (asp)

    RTFM, please. You already have the answer.<BR><BR>FormatNumber(Expression [,NumDigitsAfterDecimal [,IncludeLeadingDigit [,UseParensForNegativeNumbers [,GroupDigits]]]])<BR><BR>You should use the &#039numdigits&#039 parameter on formatnumber.<BR><BR>You can also use INT(), you can use FIX() (both depend on your rounding preference)<BR><BR>You can also do left(cstr(num), instr(cstr(num) & ".", ".") - 1)<BR><BR>You could also do about three other things.<BR><BR>

Posting Permissions

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