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:

Universal root for WC errors? (1997) Search in 2 or more catalogs (1997) Plugin or CGI or both (1997) RAM crash (1998) I think WebDNA-Talk died ... :( (1997) New public beta available (1997) Problem displaying search result (1997) RE: [isfolder] and [filename] (1997) Shared conversion under WebTen (1998) Extended [ConvertChars] (1997) Encryption of E-mail (1998) Help! (1996) Major Security Hole (1998) Logging purchases (1997) memory in high traffic servers (2004) HEADER AND FOOTER (1997) [WebDNA] tcp connect is slow...any ways to speed it up? (2008) [WebDNA] Feature request: deletefield (2017) Date Formats (1997) RE: ShowNext Command (1997)