Access/Asp - Printing currency fields

Results 1 to 2 of 2

Thread: Access/Asp - Printing currency fields

  1. #1
    Join Date
    Dec 1969

    Default Access/Asp - Printing currency fields

    Hi,<BR><BR>I am having a problem trying to print a currency variable complete with 2 decimal points:<BR>This is my code:<BR>&#060;td&#062;£&#060;%=Server.HTMLEncode (rs.Fields("PriceperPerson").Value)%&#062; &#060;/td&#062;<BR>How do I get it to print £20.50 and not £20.5 ?<BR>In my access table it doesn&#039t seem to effect the output if I specify currency or fixed format and set decimal places to 2.<BR><BR>Can anyone help?

  2. #2
    Join Date
    Dec 1969

    Default RE: Access/Asp - Printing currency fields

    Try looking into the FormatCurrency or FormatNumber Functions.<BR><BR>FormatCurrency(variable) will put the $ sign in for you.<BR><BR>FormatNumber(variable, x) will format a number with x decimals.<BR><BR><BR>HTH<BR><BR>Jerry

Posting Permissions

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