Re: [WebDNA] Formatting numbers - truncation instead of rounding

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 107470
interpreted = N
texte = --000e0ce0b1a64076f704af0598a6 Content-Type: text/plain; charset=ISO-8859-1 *Drop-off not Round-off* courtesy from Brian Fries Try this: 178.9964 = [math] [math] ((floor(178.9964*100))/100) [/math] On Mon, Oct 10, 2011 at 5:20 AM, Diane Blackmore wrote: > Hi > > Can anyone tell me the best way to truncate a number using [format] rather > than having it round up/down. > > Eg. I have 178.9964 as a value, and I need 178.99 as the outcome > > Obviously using [format .2f][value][/format] will round this to 179.00, so > I need another method. > > > Thanks all, > > > > > > --000e0ce0b1a64076f704af0598a6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Drop-off not Round-off
courtesy from 3D""= Brian Fries

Try this:

178.9964
=A0=3D
[math]
[math]
((fl= oor(178.9964*100))/100)
[/math]


On= Mon, Oct 10, 2011 at 5:20 AM, Diane Blackmore <diane@cohesion.co.nz> wrote= :
Hi

Can anyone tell me the best way to truncate a number using [format] rather = than having it round up/down.

Eg. I have 178.9964 as a value, and I need 178.99 as the outcome

Obviously using [format .2f][value][/format] will round this to 179.00, so = I need another method.


Thanks all,






--000e0ce0b1a64076f704af0598a6-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Formatting numbers - truncation instead of rounding (sgbc cebu 2011)
  2. Re: [WebDNA] Formatting numbers - truncation instead of rounding (Donovan Brooke 2011)
  3. Re: [WebDNA] Formatting numbers - truncation instead of rounding (Govinda 2011)
  4. [WebDNA] Formatting numbers - truncation instead of rounding (Diane Blackmore 2011)
--000e0ce0b1a64076f704af0598a6 Content-Type: text/plain; charset=ISO-8859-1 *Drop-off not Round-off* courtesy from Brian Fries Try this: 178.9964 = [math] [math] ((floor(178.9964*100))/100) [/math] On Mon, Oct 10, 2011 at 5:20 AM, Diane Blackmore wrote: > Hi > > Can anyone tell me the best way to truncate a number using [format] rather > than having it round up/down. > > Eg. I have 178.9964 as a value, and I need 178.99 as the outcome > > Obviously using [format .2f][value][/format] will round this to 179.00, so > I need another method. > > > Thanks all, > > > > > > --000e0ce0b1a64076f704af0598a6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Drop-off not Round-off
courtesy from 3D""= Brian Fries

Try this:

178.9964
=A0=3D
[math]
[math]
((fl= oor(178.9964*100))/100)
[/math]


On= Mon, Oct 10, 2011 at 5:20 AM, Diane Blackmore <diane@cohesion.co.nz> wrote= :
Hi

Can anyone tell me the best way to truncate a number using [format] rather = than having it round up/down.

Eg. I have 178.9964 as a value, and I need 178.99 as the outcome

Obviously using [format .2f][value][/format] will round this to 179.00, so = I need another method.


Thanks all,






--000e0ce0b1a64076f704af0598a6-- sgbc cebu

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

PC site chck pls (2003) Request for page test (2003) Hiding HTML and page breaks (1997) [quantity] - spoke too soon (1997) MATH TIME (1997) Re:no [search] with NT (1997) Sorting by date (1997) WebCatalog Technical Reference (1997) Sorry WebCat server not running (2001) Uh...can someone help me out with the b10? (1997) PIXO (1997) Fun with dates (1997) Re:quit command on NT (1997) Help with database strategy (1998) passing variables - problem (1997) Lost and Recovered. (1998) WebCat2: Found Items syntax, etc. (1997) WebCat2b13 Command Reference Doc error (1997) Javascript/WebCatalog form population (2001) WCS Newbie question (1997)