RE: format problem on NT?
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 13134
interpreted = N
texte = Olin ->When I use format like this:>[format thousands .0f][math]test*7*18[/math][/format]>I get this as a result:>4,456,>I also tried [format thousands f] and I get:>4,456.000000>How can I get rid of the last comma?It appears that you've found a bug in the NT version -- we've added it to the list. If you have to do this in the meantime, you can try this approach:[format 5s][format thousands .0f]1000[/format][/format]which will output 1,000 (it takes the 1,000, from the first format, makes it a string and cuts it off at 5 characters). Unfortunately, this only works if you know how many digits you are dealing with, but I suppose you could try some creative WebDNA to figure out how many digits and commas you'll get and use that to know where to limit the string (I'd recommend just waiting for it to be fixed, which should be fairly soon).Anyway, thanks for pointing this out,Marc EagleStarNine Technologieshttp://www.smithmicro.com/
Associated Messages, from the most recent to the oldest:
|
- RE: format problem on NT? (Marc Eagle 1997)
|
Olin ->When I use format like this:>[format thousands .0f]
[math]test*7*18[/math][/format]>I get this as a result:>4,456,>I also tried [format thousands f] and I get:>4,456.000000>How can I get rid of the last comma?It appears that you've found a bug in the NT version -- we've added it to the list. If you have to do this in the meantime, you can try this approach:[format 5s][format thousands .0f]1000[/format][/format]which will output 1,000 (it takes the 1,000, from the first format, makes it a string and cuts it off at 5 characters). Unfortunately, this only works if you know how many digits you are dealing with, but I suppose you could try some creative WebDNA to figure out how many digits and commas you'll get and use that to know where to limit the string (I'd recommend just waiting for it to be fixed, which should be fairly soon).Anyway, thanks for pointing this out,Marc EagleStarNine Technologieshttp://www.smithmicro.com/
Marc Eagle
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:
Emailed problem (2000)
search form problem.. (1997)
Problems with dbcatalog.exe (1997)
Credit card types (1997)
WebDNA tags in WebMerchant email templates ... (1997)
A workaround for handling date range search in yyyy/mm/dd form (1997)
ConverChars (1999)
Interpret twice? (1997)
formvariables exact=F (2004)
Fed Ex Interaction (2003)
[SHOWIF AND/OR] (1997)
webcat2b12 CGI -- Date comparisons (1997)
WC2.0 Memory Requirements (1997)
How can I do (2000)
[WebDNA] When was autonumber added? (2010)
Will there be a PPC Linux version? (2000)
Default admin bug and how tech support reacted to it. (2000)
URGENT! Locked DB's (2001)
Protect Tag and Groups (1998)
WCS Newbie question (1997)