Returning Decimal Places??

Results 1 to 2 of 2

Thread: Returning Decimal Places??

  1. #1
    Join Date
    Dec 1969

    Default Returning Decimal Places??

    Hi,<BR> <BR>I&#039m having a problem which I haven&#039t been able to find an answer to in any resource book or any website. My Access database contains a field called "Cost" whose contents I would like to display with two decimal places (for obvious reasons) when queried from a search form. The field at the moment is of type "Double", with 2 decimal places, and Format is "Fixed". My ASP code to retrieve the fields in the database is correct, though the decimal places in the Cost field do not show up - it displays the number as an integer.<BR> <BR>The ASP code for printing the Cost field contents is simply: &#060;%=rs("Cost")&#037;&#062;, where rs is a recordset.<BR> <BR>Any help would be greatly appreciated,<BR>Dave.

  2. #2
    John Harvey Guest

    Default RE: Returning Decimal Places??

    Try using this and see if it works<BR>&#060;%= FormatNumber(rs("Cost"),2)&#037;&#062;, <BR>Good Luck!<BR>John

Posting Permissions

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