Re: I can't set the variable

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 62991
interpreted = N
texte = Is there a field in your hours.db named "numdays"? If so, then your code is working but WebDNA is showing you the DB field "numdays" (value "0") rather than the text variable "numdays" (value "3"). - Brian On Sep 11, 2005, at 6:59 AM, sbraun wrote: > Thanks Gary, but no luck. > I've copied and pasted your code into it. > Still no luck. What's wrong? > > > Here's the entire script: > > > > > > > > alink="#ff0000"> > > [search db=hours.db&grSKUdata=1&asSKUsort=1&deTIME_INsort=2&max=1] > [founditems] > > DATE_IN=[DATE_IN]
> DATE_OUT=[DATE_OUT]
> [math][DATE_OUT]-[DATE_IN][/math] days
> [text]numdays=[math][DATE_OUT]-[DATE_IN][/math][/text] > numdays=[numdays] > > [/founditems][/search] >
>
> > > > > Here's the output: > DATE_IN=732557 > DATE_OUT=732560 > 3 days > numdays=0 > > > On Sep 11, 2005, at 12:04 AM, Gary Krockover wrote: > >> Yeah, similarly, this worked for me: >> >> [text show=f]DATE_IN=732557[/text] >> [text show=f]DATE_OUT=732560[/text] >> >> DATE_IN=[DATE_IN]
>> DATE_OUT=[DATE_OUT]
>> [math][DATE_OUT]-[DATE_IN][/math] days
>> [text]numdays=[math][DATE_OUT]-[DATE_IN][/math][/text] >> numdays=[numdays] >> >> output: >> >> DATE_IN=732557 >> DATE_OUT=732560 >> 3 days >> numdays=3 >> >> >> At 10:54 PM 9/10/2005, you wrote: >>> Did you define [DATE_IN] and [DATE_OUT] higher up on the page? >>> >>> This worked for me: >>> >>> [math]DATE_IN=732557[/math]
>>> [math]DATE_OUT=732560[/math]
>>> >>> [math][DATE_OUT]-[DATE_IN][/math] days
>>> [text]numdays=[math][DATE_OUT]-[DATE_IN][/math][/text] >>> numdays=[numdays] >>> >>> output: >>> >>> 732557 >>> 732560 >>> 3 days >>> numdays=3 ------------------------------------------------------------- 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 Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: I can't set the variable ( Brian Fries 2005)
  2. I can't set the variable ( sbraun 2005)
Is there a field in your hours.db named "numdays"? If so, then your code is working but WebDNA is showing you the DB field "numdays" (value "0") rather than the text variable "numdays" (value "3"). - Brian On Sep 11, 2005, at 6:59 AM, sbraun wrote: > Thanks Gary, but no luck. > I've copied and pasted your code into it. > Still no luck. What's wrong? > > > Here's the entire script: > > > > > > > > alink="#ff0000"> > > [search db=hours.db&grSKUdata=1&asSKUsort=1&deTIME_INsort=2&max=1] > [founditems] > > DATE_IN=[DATE_IN]
> DATE_OUT=[DATE_OUT]
> [math][DATE_OUT]-[DATE_IN][/math] days
> [text]numdays=[math][DATE_OUT]-[DATE_IN][/math][/text] > numdays=[numdays] > > [/founditems][/search] >
>
> > > > > Here's the output: > DATE_IN=732557 > DATE_OUT=732560 > 3 days > numdays=0 > > > On Sep 11, 2005, at 12:04 AM, Gary Krockover wrote: > >> Yeah, similarly, this worked for me: >> >> [text show=f]DATE_IN=732557[/text] >> [text show=f]DATE_OUT=732560[/text] >> >> DATE_IN=[DATE_IN]
>> DATE_OUT=[DATE_OUT]
>> [math][DATE_OUT]-[DATE_IN][/math] days
>> [text]numdays=[math][DATE_OUT]-[DATE_IN][/math][/text] >> numdays=[numdays] >> >> output: >> >> DATE_IN=732557 >> DATE_OUT=732560 >> 3 days >> numdays=3 >> >> >> At 10:54 PM 9/10/2005, you wrote: >>> Did you define [DATE_IN] and [DATE_OUT] higher up on the page? >>> >>> This worked for me: >>> >>> [math]DATE_IN=732557[/math]
>>> [math]DATE_OUT=732560[/math]
>>> >>> [math][DATE_OUT]-[DATE_IN][/math] days
>>> [text]numdays=[math][DATE_OUT]-[DATE_IN][/math][/text] >>> numdays=[numdays] >>> >>> output: >>> >>> 732557 >>> 732560 >>> 3 days >>> numdays=3 ------------------------------------------------------------- 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 Web Archive of this list is at: http://webdna.smithmicro.com/ Brian Fries

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:

Search Question (2000) Re:2nd WebCatalog2 Feature Request (1996) no global [username] or [password] displayed ... (1997) What am I missing (1997) Quickie question on the email templates (1997) sendmail formatting (2001) Multiple Ad databases? (1997) Quitting WebMerchant ? (1997) [WebDNA] WebDNA 7 (2011) hiding the "Sorry WebDNA server not running" message (2005) cart (1997) WebCatalog [FoundItems] Problem - LONG - (1997) HTML encoding in URLs (1997) Opinion: [input] should be called [output] ... (1997) PIXO (1997) [Sum] function? (1997) [WebDNA] Variable mystery (2009) two of the same named db's open at once (1998) [input]?? (1998) timezone calculations (2001)