Convert to Decimal

Results 1 to 2 of 2

Thread: Convert to Decimal

  1. #1
    Curtis Guest

    Default Convert to Decimal

    How do you take a string like 25.53237 and convert it to a numeric value with 2 decimal places? Can you use the same funtion for currency?

  2. #2
    Join Date
    Dec 1969

    Default RE: Convert to Decimal

    You could convert the string to a numeric value, check the rounding of the number and decide if you need to round up or down. Then, you could convert it to a string, and read the value in 2 places to the right of the decimal, using the new value (or you could just truncate it)<BR><BR>&#060;OR&#062;<BR><BR>You could use FormatNumber(yournumber, 2) ;)

Posting Permissions

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