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:
WC hosting services required (1998)
Attn: Bug in GeneralStore example b15 (1997)
Summing fields (1997)
Caching [include] files ... (1997)
WebCatalog template cache (1998)
feature request-- [epoch] (2004)
Fun with Dates - finally resolved but.... (1997)
WCS Newbie question (1997)
2.0Beta Command Ref (can't find this instruction) (1997)
CAPTCHA system in webDNA (2005)
PSC recommends what date format yr 2000??? (1997)
email address with spaces (2001)
WebCatalog 4.0 has been released! (2000)
WebCatalog host... (2000)
Location of Browser Info.txt file (1997)
Only charge card when product shipped ? (1997)
[OT] SSL (2003)
upgrade? (1997)
No luck with taxes (1997)
Summing fields (1997)