You guessed it:

#numberFormat(round(AOP.NET_PRICE), ",")#

You could use a temp variable if you want, but that would be less readable,
in my opinion.  The exception would be if you're using the rounded value
more than once, and it's not always going to be numberformatted (like in a
computation).  then a temp variable makes sense.

cheers,
barneyb
  -----Original M  essage-----
  From: Les Mizzell [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, November 12, 2003 4:58 PM
  To: CF-Talk
  Subject: Round and Format - Best Way?

  If "AOP.NET_PRICE" equals #1256.98, I need to not only round it off to
  "1257":

  #Round(AOP.NET_PRICE)#

  .....but also format the number to show the comma at the thousands

  #NumberFormat()# doesn't round, so without a horrible nested mess,
  what's the best way to get this:

  1,257

  --
  Les Mizzell
  -------------------------
  “Mihi placent, O Pincerna!
    Virent ova! Viret perna!
    Dapem posthac non arcebo.
    Gratum tibi me praebebo.”


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to