Re: Truncated numbers

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 30663
interpreted = N
texte = 1,234.56 is not a number, it is a string. Never put commas into anything you wish to treat as a number; you can always use format to output the comma-delimited number. Ken's solution can be used to fix it, but it is bad design to have to fix it at all. Numbers are 0-9 and the decimal point only.John Peacock ____________________Reply Separator____________________ Subject: Truncated numbers Author: (WebCatalog Talk) Date: 4/20/2000 12:58 PMI have some prices in a db that look like this 1,234.56When I use $[format .2f][Priceone][/format] the result gives me $1.23The obvious problem is the comma, how can I stop this happening? -- Stuart TremainDigital Imaging Division The Ad-Libitum Group 48 Victoria Street North Sydney 2060 Australia Phone: +612 9959 5633 Fax: +612 9929 4146email: stuartt@adlib.com.au http://www.adlib.com.au ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Associated Messages, from the most recent to the oldest:

    
  1. Re: Truncated numbers (Stuart Tremain 2000)
  2. Re: Truncated numbers (jpeacock@univpress.com 2000)
1,234.56 is not a number, it is a string. Never put commas into anything you wish to treat as a number; you can always use format to output the comma-delimited number. Ken's solution can be used to fix it, but it is bad design to have to fix it at all. Numbers are 0-9 and the decimal point only.John Peacock ____________________Reply Separator____________________ Subject: Truncated numbers Author: (WebCatalog Talk) Date: 4/20/2000 12:58 PMI have some prices in a db that look like this 1,234.56When I use $[format .2f][Priceone][/format] the result gives me $1.23The obvious problem is the comma, how can I stop this happening? -- Stuart TremainDigital Imaging Division The Ad-Libitum Group 48 Victoria Street North Sydney 2060 Australia Phone: +612 9959 5633 Fax: +612 9929 4146email: stuartt@adlib.com.au http://www.adlib.com.au ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to jpeacock@univpress.com

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:

Migrating to NT (1997) Requiring that certain fields be completed (1997) search engine friendly URLS (Mac) and Lycos! (1998) Problems passing [SKU] with $Replace in 2.0 (1997) Which beta for w* 4.1 and a problem w/b12 (1999) Force a search at the default.tmpl page? (1997) Message Board (2001) Strange intermittent WebDNA problems (2008) Re(2): typhoon ? (2003) Undeliverable Mail (1997) WebCatalog for Mac 2.0.1 Released (1997) passing large amount of text in post form (2005) Securing a Directory (2000) Log-in Scheme (2003) WebCatalog can't find database (1997) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) japanese characters (1997) Help name our technology! I found it (1997) syntax question, not in online refernce (1997) [WebDNA] Bullet proof dynamic tables (2009)