Re: Dates and Math - Simple Subtraction

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 58888
interpreted = N
texte = Try a 'range'd search: [text show=F]thisdate=[date][/text] [text show=F]twoweeksago=[math date]{[date]}-{00/14/0000}[/math][/text] [search db=admin/cars- n.db&geSTOCKdata=[blank]&rnSolddatarq=[twoweeksago] [thisdate]&Soldtype=date] GK On Mon, 26 Jul 2004 17:12:02 -0400 David Cate wrote: >Hello, > >I'm trying to only show records that exist within the >past two weeks. If an item was sold more than two weeks >ago, we don't want to display the record. > >Can someone tell me where I've gone wrong? > >1. Define [TODAY[ >[text]TODAY=[date %m/%d/%y][/text] >(Note: Database already carries 00/00/00 value) - Number >turns out fine > >2. Define two week value >[text]TWOWEEK=[Math]{[TODAY]}-{00/14/00}[/Math][/text] >(This seems to be the problem - This turns out a number >34870 - not sure how that happened. > >3. Format TWO WEEK to var [SOLDDATE] >[text]SOLDDATE=[format days_to_date >%m/%d/%y][THREEWEEK][/format][/text] >(value turns out 00/00/00) > >Here's the search query...which obviously does not work. >Anyone have any suggestions for anything for me look at? >[search db=admin/cars- >n.db&geSTOCKdata=[blank]&geSolddata=[SOLDDATE]&SOLDtype=date] > >Thanks in advance. ------------------------------------------------------------- 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: Dates and Math - Simple Subtraction ( Brian Fries 2004)
  2. Re: Dates and Math - Simple Subtraction ( David Cate 2004)
  3. Re: Dates and Math - Simple Subtraction ( "Gary Krockover" 2004)
  4. Re: Dates and Math - Simple Subtraction ( Brian Fries 2004)
  5. Re: Dates and Math - Simple Subtraction ( David Cate 2004)
  6. Re: Dates and Math - Simple Subtraction ( Brian Fries 2004)
  7. Dates and Math - Simple Subtraction ( David Cate 2004)
Try a 'range'd search: [text show=F]thisdate=[date][/text] [text show=F]twoweeksago=[math date]{[date]}-{00/14/0000}[/math][/text] [search db=admin/cars- n.db&geSTOCKdata=[blank]&rnSolddatarq=[twoweeksago] [thisdate]&Soldtype=date] GK On Mon, 26 Jul 2004 17:12:02 -0400 David Cate wrote: >Hello, > >I'm trying to only show records that exist within the >past two weeks. If an item was sold more than two weeks >ago, we don't want to display the record. > >Can someone tell me where I've gone wrong? > >1. Define [TODAY[ >[text]TODAY=[date %m/%d/%y][/text] >(Note: Database already carries 00/00/00 value) - Number >turns out fine > >2. Define two week value >[text]TWOWEEK=[math]{[TODAY]}-{00/14/00}[/Math][/text] >(This seems to be the problem - This turns out a number >34870 - not sure how that happened. > >3. Format TWO WEEK to var [SOLDDATE] >[text]SOLDDATE=[format days_to_date >%m/%d/%y][THREEWEEK][/format][/text] >(value turns out 00/00/00) > >Here's the search query...which obviously does not work. >Anyone have any suggestions for anything for me look at? >[search db=admin/cars- >n.db&geSTOCKdata=[blank]&geSolddata=[SOLDDATE]&SOLDtype=date] > >Thanks in advance. ------------------------------------------------------------- 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/ "Gary Krockover"

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:

WebCat2b13 Command Reference Doc error (1997) How to verify email address (1997) Emailer (1997) Webcat 3.0.5b9, b8 trigger failures ON WEBSTAR (1999) WebDNA wholesale ... (2002) Signal Raised (1997) possible, WebCat2.0 and checkboxes-restated (1997) Re:quit command on NT (1997) Credit Card Number checking (1997) Question re: FlushDatabases (1997) attn: smitmicro - cart limitation (2002) RE: [WebDNA] tcp connect is slow...any ways to speed it up? (2008) Replacing a Word (1999) [WebDNA] [OT] BBEdit Glossary (2012) Nav. 4 probs with cart - Serious problem (1997) Some Questions (1997) Banners (1997) Training Tapes Improved (1998) Search (1997) The Form authentication trick (2000)