Float numbers in ASP

Results 1 to 3 of 3

Thread: Float numbers in ASP

  1. #1
    Daman Guest

    Default Float numbers in ASP

    I have float numbers like 19.3999999999 in the database, which i am trying to populate in a simple text box on the ASP page .However when i extract the value from the database using a SQL query and put it on the page , i get it as 19.4 (rounded off) instead of the complete 19.3999999999 . I think that the query returns the complete number, however the problem occurs when i put the number in a variable . Is there any way i can achieve this ??<BR><BR>Thanks in advance ..

  2. #2
    Join Date
    Dec 1969

    Default RE: Float numbers in ASP

    Try using FormatNumber() if you are using VBScript <BR><BR><BR>Or for Javascript you might want to try this instead - http://www.4guysfromrolla.com/webtech/vb2java.shtml <BR><BR><BR>

  3. #3
    Daman Guest

    Default RE: Float numbers in ASP

    I am using VBScript ..and FormatNumber () did work for me ...thanks !!

Posting Permissions

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