Re: [WebDNA] search by range of dates
This WebDNA talk-list message is from 2009
It keeps the original formatting.
numero = 103994
interpreted = N
texte = Hi Terry, I've read the docs you've mentioned. Thank you.I've tried your suggestions, along with a dozen other variations, and I either get all the records returned, or no records returned.This is the current code which returns no records. Am I setting the TENDAYSAGO variable wrong? It looks correct on my screen.[text]TENDAYSAGO=[math date]{[date]}-10[/math][/text] TENDAYSAGO= [TENDAYSAGO]
[search db=assign_events/ temp.db&grSKUPdata=0&FORMATTED_DATEtype=date&rnFORMATTED_DATEdatarq= [TENDAYSAGO] [date]]I get every past record returned if I use {[TENDAYSAGO]}.At least it not giving me future dated records anymore.Thanks again,sfbOn Nov 12, 2009, at 12:00 AM, Terry Wilson wrote:> Yeah a few things. You can't do two fieldnamedata=xx on the same > field. Instead, use range. That would be > rnfieldnamedatarq=firstdate seconddate. Also, TENDAYSAGOtype=date > is not valid; not needed. Use that just for the fieldname, as you > already do in FORMATTED_DATEtype=date. Please refer to the online > docs for guidance on searching -- http://webdna.us/page.dna? > numero=69 is a pretty long page, but it has all the info on > constructing a search.>> Terry>>> On Wed, 11 Nov 2009 23:50:15 -0500> sbraun
wrote:> > Thanks Stuart, your help made sense, so I added it,> > but it's still not working for me.> > I'm trying to return only the records within the> >preceding 10 days.> > here's my code, the field name is FORMATTED_DATE:> >> > [text]TENDAYSAGO=[math date]{[date]}-10[/math][/text]> > [search db=/> >temp.db&grSKUdata=0&FORMATTED_DATEtype=date&TENDAYSAGOtype=date&leFOR > MAT> >TED_DATEdatarq=[date][!]> > [/!]&geFORMATTED_DATEdata=[TENDAYSAGO]&deFORMATTED_DATEsort=1]> >> > Any ideas for me? Thanks,> > sfb> >> >> > On Nov 11, 2009, at 10:01 PM, Stuart Tremain wrote:> >> >> Add this to your search ...> >>> >> &FIELDNAMEtype=date> >>> >> Regards> >> Stuart Tremain> >> >> On 12/11/2009, at 1:42 PM, sbraun wrote:> >>>> >>> I wish to run a search to find a range of dates 10 days> >>>before> >>> today, and 10 days following today.> >>> I can easily set the two before and after variable dates> >>>in xx/xx/> >>> xxxx format, but I can't seem to get the search tag to> >>>return any> >>> results between these two variables.> > ---------------------------------------------------------> > This message is sent to you because you are subscribed> >to> > the mailing list .> > To unsubscribe, E-mail to: > > archives: http://mail.webdna.us/list/talk@webdna.us> > old archives: http://dev.webdna.us/TalkListArchive/> > Bug Reporting:> >http://forum.webdna.us/eucabb.html?page=topics&category=288>>
Associated Messages, from the most recent to the oldest:
Hi Terry, I've read the docs you've mentioned. Thank you.I've tried your suggestions, along with a dozen other variations, and I either get all the records returned, or no records returned.This is the current code which returns no records. Am I setting the TENDAYSAGO variable wrong? It looks correct on my screen.[text]TENDAYSAGO=[math date]{[date]}-10[/math][/text] TENDAYSAGO= [TENDAYSAGO]
[search db=assign_events/ temp.db&grSKUPdata=0&FORMATTED_DATEtype=date&rnFORMATTED_DATEdatarq= [TENDAYSAGO] [date]]I get every past record returned if I use {[TENDAYSAGO]}.At least it not giving me future dated records anymore.Thanks again,sfbOn Nov 12, 2009, at 12:00 AM, Terry Wilson wrote:> Yeah a few things. You can't do two fieldnamedata=xx on the same > field. Instead, use range. That would be > rnfieldnamedatarq=firstdate seconddate. Also, TENDAYSAGOtype=date > is not valid; not needed. Use that just for the fieldname, as you > already do in FORMATTED_DATEtype=date. Please refer to the online > docs for guidance on searching -- http://webdna.us/page.dna? > numero=69 is a pretty long page, but it has all the info on > constructing a search.>> Terry>>> On Wed, 11 Nov 2009 23:50:15 -0500> sbraun wrote:> > Thanks Stuart, your help made sense, so I added it,> > but it's still not working for me.> > I'm trying to return only the records within the> >preceding 10 days.> > here's my code, the field name is FORMATTED_DATE:> >> > [text]TENDAYSAGO=[math date]{[date]}-10[/math][/text]> > [search db=/> >temp.db&grSKUdata=0&FORMATTED_DATEtype=date&TENDAYSAGOtype=date&leFOR > MAT> >TED_DATEdatarq=[date][!]> > [/!]&geFORMATTED_DATEdata=[TENDAYSAGO]&deFORMATTED_DATEsort=1]> >> > Any ideas for me? Thanks,> > sfb> >> >> > On Nov 11, 2009, at 10:01 PM, Stuart Tremain wrote:> >> >> Add this to your search ...> >>> >> &FIELDNAMEtype=date> >>> >> Regards> >> Stuart Tremain> >> >> On 12/11/2009, at 1:42 PM, sbraun wrote:> >>>> >>> I wish to run a search to find a range of dates 10 days> >>>before> >>> today, and 10 days following today.> >>> I can easily set the two before and after variable dates> >>>in xx/xx/> >>> xxxx format, but I can't seem to get the search tag to> >>>return any> >>> results between these two variables.> > ---------------------------------------------------------> > This message is sent to you because you are subscribed> >to> > the mailing list .> > To unsubscribe, E-mail to: > > archives: http://mail.webdna.us/list/talk@webdna.us> > old archives: http://dev.webdna.us/TalkListArchive/> > Bug Reporting:> >http://forum.webdna.us/eucabb.html?page=topics&category=288>>
sbraun
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:
searching for last file in a directory (1999)
Re1000001: Setting up shop (1997)
New Site Announcement (1998)
Using Cookie for client specific info? (1997)
[OT] html background att (2003)
What's wrong with this replace? (2002)
problems with 2 tags (1997)
[WebDNA] shopping sites and the "old commerce tags" (2012)
Reversed words (1997)
[WebDNA] Searching Possible Bug (2009)
Generating Report Totals (1997)
Security Tip (1996)
[SHOWIF]s and empty arguments (1997)
Size limit for tmpl editor ? (1997)
Summing fields (1997)
showif and cart (1997)
Help! WebCat2 bug (1997)
URGENT! Locked DB's (2001)
MacAuthorize order data fields WAS:How To question... (1997)
Speed Test Results Dell 2650 Xeon 2.4ghz (2002)