Re: Showif dates...

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 45936
interpreted = N
texte = Isn't this example ({[date]}<{15/12/2000}) just evaluating dates and has nothing to do with [math]?{[date]} would bring up the value 4/12/2002 (running as dd/mm/yyyy). And as the docs says Dates must be enclosed in curly braces to distinguish them from regular numbers. So ({[date]}<{15/12/2000}) becomes ({4/12/2002}<{15/12/2000}) which because the curly brackets indicates they are dates, evaluates as true and has nothing to do with [math], or am I wrong?Regards, Tim> From: Grant Hulbert > Reply-To: (WebCatalog Talk) > Date: Tue, 3 Dec 2002 15:06:37 -0800 > To: (WebCatalog Talk) > Subject: Re: Showif dates... > >> Tim's version and my version of the same code brings a question to mind. >> >> I am of the mindset the you would need the math (like Tim used), but in the >> WebDocs under the if statement it shows this as an example: >> >> [If (([username]=Grant) | ([grandTotal]<100)) & ({[date]}<{2/15/2000})] >> >> where the dates is between the {} but without the math context. Which is >> correct? > > Turns out the [If] context is really just a disguised [math] context that > evaluates to true/false, so the example is correct: the {} work just fine in > this case because they really think they're inside a [math] context already. > -- > ____________________________________________________________________________ __> _ > Grant Hulbert | Internet Software Architect | > http://www.hulbertfamily.com/ > > ------------------------------------------------------------- > 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/ > ------------------------------------------------------------- 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: Showif dates... (Donovan Brooke 2002)
  2. Re: Showif dates... (Tim Robinson 2002)
  3. Re: Showif dates... (Grant Hulbert 2002)
  4. Re: Showif dates... (Inkblot Media 2002)
  5. Re: Showif dates... (Inkblot Media 2002)
  6. Re: Showif dates... (Inkblot Media 2002)
  7. Re: Showif dates... (Inkblot Media 2002)
  8. Re: Showif dates... (Tim Robinson 2002)
  9. Fwd: Showif dates... (Claude Gelinas 2002)
Isn't this example ({[date]}<{15/12/2000}) just evaluating dates and has nothing to do with [math]?{[date]} would bring up the value 4/12/2002 (running as dd/mm/yyyy). And as the docs says Dates must be enclosed in curly braces to distinguish them from regular numbers. So ({[date]}<{15/12/2000}) becomes ({4/12/2002}<{15/12/2000}) which because the curly brackets indicates they are dates, evaluates as true and has nothing to do with [math], or am I wrong?Regards, Tim> From: Grant Hulbert > Reply-To: (WebCatalog Talk) > Date: Tue, 3 Dec 2002 15:06:37 -0800 > To: (WebCatalog Talk) > Subject: Re: Showif dates... > >> Tim's version and my version of the same code brings a question to mind. >> >> I am of the mindset the you would need the math (like Tim used), but in the >> WebDocs under the if statement it shows this as an example: >> >> [If (([username]=Grant) | ([grandTotal]<100)) & ({[date]}<{2/15/2000})] >> >> where the dates is between the {} but without the math context. Which is >> correct? > > Turns out the [if] context is really just a disguised [math] context that > evaluates to true/false, so the example is correct: the {} work just fine in > this case because they really think they're inside a [math] context already. > -- > ____________________________________________________________________________ __> _ > Grant Hulbert | Internet Software Architect | > http://www.hulbertfamily.com/ > > ------------------------------------------------------------- > 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/ > ------------------------------------------------------------- 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/ Tim Robinson

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:

well sort of - database design (2003) [browsername] (2001) [OT] Linux -> Winderz (2005) Mac v. NT (1998) emailer w/F2 (1997) More on the email templates (1997) Creating main- and sub-category search (1997) Multiple Pulldowns (1997) [SHOWIF AND/OR] (1997) Sales Tax db (1998) Missing Cart Information (2003) Searchable archives gone again??? (2000) Formating found categories (1997) Robert Minor duplicate mail (1997) Great product and great job ! (1997) PCS Frames (1997) Replto in [SendMail] (2000) WebMerchant & CC Response (2002) RE: WebDNA-Talk searchable? (1997) [WebDNA] [OT] the "Work in progress" thread. (2009)