formatnumber syntax

Results 1 to 2 of 2

Thread: formatnumber syntax

  1. #1
    Join Date
    Dec 1969

    Default formatnumber syntax

    Hi there, can anyone assist here?<BR>i need to format a number with decimal places, let&#039;s say 1258946,9854<BR><BR>if i use formatnumber(1258946,9854) then the result is<BR>1.258.946,99<BR><BR>but if i want to get 1258946,99 how should i use it?<BR>and if i don&#039;t want it to be rounded? and want to get 1258946,98?<BR><BR>tkhs in advance

  2. #2
    Join Date
    Dec 1969

    Default RE: formatnumber syntax

    I had the same problem. I used split to cut of the numbers behind the comma (9854). Then I use Left to cut off 3 numbers (985). With Right you can read the last number (5). If this number is &#062;5 then increase the 98, otherwise do nothing. <BR>If you want to round it, just cut the last 2 digits off.<BR>Then just use join to put it together.<BR><BR>If you want the code, say it and i will put it here. It&#039;s a bit large and could possible be better programmed, but it works!!

Posting Permissions

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