Re: formatting a number
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 22302
interpreted = N
texte = At 10:24 Uhr -0600 05.01.1999, Sue Ann Sanders wrote:>When my customer adds a record, they have a field where they enter a>number. I need single digit numbers to be 2 digits so that they sort>correctly. For example, if they enter 1, I need to add it to the database>as 01.>>I read the Format info in the WC online Reference but didn't see how to>do this. How can I accomplish this?Look if the input is less than 10 and add a leading zero:[append db=my.db]FIELD= [showif [math][v_input][math]<10]0[/showif] [v_input][/append](all on one line, of course)Peter++++++++++++++++++++++++++++++++++++++++++++++++Peter Ostry - Vienna/Austria - www.ostry.comFon ++43-1-877 74 54 Fax ++43-1-877 74 54-21++++++++++++++++++++++++++++++++++++++++++++++++
Associated Messages, from the most recent to the oldest:
At 10:24 Uhr -0600 05.01.1999, Sue Ann Sanders wrote:>When my customer adds a record, they have a field where they enter a>number. I need single digit numbers to be 2 digits so that they sort>correctly. For example, if they enter 1, I need to add it to the database>as 01.>>I read the Format info in the WC online Reference but didn't see how to>do this. How can I accomplish this?Look if the input is less than 10 and add a leading zero:[append db=my.db]FIELD= [showif
[math][v_input]
[math]<10]0[/showif] [v_input][/append](all on one line, of course)Peter++++++++++++++++++++++++++++++++++++++++++++++++Peter Ostry - Vienna/Austria - www.ostry.comFon ++43-1-877 74 54 Fax ++43-1-877 74 54-21++++++++++++++++++++++++++++++++++++++++++++++++
Peter Ostry
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:
form data submission gets truncated (1997)
WebCat2b15MacPlugin - showing [math] (1997)
shown next / show prev (1998)
What Country (2004)
Using Plug-In while running 1.6.1 (1997)
ooops...WebCatalog [FoundItems] Problem - LONG - (1997)
show related items (2003)
[WebDNA] [array] (2009)
Grep help, please ... (2003)
[/application] error? (1997)
DB Size - MAX (2004)
shaopping cart limits (2000)
No Data Results (1997)
calculating tax rates, mail order solutions and version 2 (1997)
THANKS (1997)
Hello??? (1997)
Location of Browser Info.txt file (1997)
Separate SSL Server (1997)
Ticket Ordering Question (2003)
syntax for contains a word - oops (2002)