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:
authorizenet and netscape (2002)
emailer and bad addresses (1997)
WebCat b15 Mac plug-in (1997)
WebTEN vs webSTAR (1998)
[WebDNA] fastcgi 7+ & [cart]? (2010)
How To get Some Help (2003)
Security Tip (1996)
with Link i need to (1997)
A few questions. . . (1997)
[LOOKUP] (1997)
Subtotal Taxabletotal Grandtotal **CART** (2005)
Webcatalog, Webstar and Crasharama (1999)
eBay API thru webDNA (2004)
syntax question, not in online refernce (1997)
shipping code (1998)
Sorting by date (1997)
textA (1998)
WebCat2b12 forgets serial # (1997)
Popup Menu Options (1998)
[Sum] function? (1997)