Re: [WebDNA] search by range of dates

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 103995
interpreted = N
texte =
It looks good, and you are proving to yourself that the variable is set properly; that's =A0alwa= ys a good idea when problems crop up. Make sure your database actually has some records for the past ten days? And that t= he format in the db is mm/dd/yyyy, not mm/dd/yy, because this won't sort right. (I ran into this recently where = some dates were YY and some were YYYY. They didn't sort right until I made them consistent.)

Also, in your code below,=A0grSKUPdata=3D0 --> where di= d that P come from? maybe this is a typo that's breaking it.=A0

On= Thu, 12 Nov 2009 00:47:57 -0500
sbraun <sbraun1@twcny.rr.com> wrote:
> Hi Terry, I've read the = docs you've mentioned.
> Thank you.
> I've tried your suggestions, along with a dozen other
&g= t;variations, and I either get all the records returned,
>or no records returned.
> This is the current cod= e which returns no records. Am I
>setting the TENDAYSAGO variable wrong? It looks correct
>= ;on my screen.
>
> [text]TENDAYSAGO=3D[math date]{[date]}-10[/math][/text]
> TENDA= YSAGO=3D [TENDAYSAGO] <br>
> [search db=3Dassign_events/
>temp.db&grSKUPdata=3D0&FORMATTED_DATE= type=3Ddate&rnFORMATTED_DATEdatarq=3D
>[TENDAYSAGO] [date]]
>
> I get every past record ret= urned if I use
>{[TENDAYSAGO]}.
> At least it not giving me future dated records anymore.
>
> = Thanks again,
> sfb
>
>
>
> On Nov 12, 2009, at 12:00 AM, Terry Wilson wrote:
&g= t;
>> Yeah a few things. You can't do two fieldnamedata=3Dxx on
>>the same
>> field. Inste= ad, use range. That would be
>> rnfieldnamedatarq=3Dfirstdate seconddate. Also,
>>TENDAYSAGOtyp= e=3Ddate
>> is not valid; not needed. Use that just for the
>>fieldname, as you
>> already= do in FORMATTED_DATEtype=3Ddate. Please refer to
>>the online
>> docs for guidance on searching -- >>http://webdna.us/page.dna?
>> numero=3D69 is a pretty long page, but it has all the info <= br>>>on
>> constructing a search.
>>
>> Terry
>>
>>
>>= On Wed, 11 Nov 2009 23:50:15 -0500
>> sbraun <sbraun1@twcny.rr.com> 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, t= he field name is FORMATTED_DATE:
>> >
>> > [text]TENDAYSAGO=3D[math date]{[date]}-10[/math][/t= ext]
>> > [search db=3D/
>> >temp.db&grSKUdata=3D0&FORMATTED_DATEtype=3Ddate&TENDAYSAG= Otype=3Ddate&leFOR
>> MAT
>> >TED_DATEdatarq=3D[date][!]
>> >
>>[/!]&geFO= RMATTED_DATEdata=3D[TENDAYSAGO]&deFORMATTED_DATEsort=3D1]
>> >
>> > Any ideas for me? Thanks,
>> > sfb
&= gt;> >
>> >
>> > On Nov 11, 2009, at 10:01 PM, Stuart Tremain wrote:
>> >
&= gt;> >> Add this to your search ...
>> >>
>> >> &FIELDNAMEtype=3Ddate>> >>
>> >> 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
>&= gt;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 mailin= g list <talk@webdna.us>.
>> > To unsubscribe, E-mail to: <talk-leave@webdna.us>
>> > = 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=3Dtopics&category=3D288>>
>>
>
> ---------------------------------------------------------
> This me= ssage is sent to you because you are subscribed
>to
> the mailing list <talk@webdna.us>.
> To un= subscribe, E-mail to: <talk-leave@webdna.us>
> 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=3Dtopics&category=3D288

=A0=
Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] search by range of dates (sbraun 2009)
  2. Re: [WebDNA] search by range of dates (Govinda 2009)
  3. Re: [WebDNA] search by range of dates (Donovan Brooke 2009)
  4. Re: [WebDNA] search by range of dates (Govinda 2009)
  5. Re: [WebDNA] search by range of dates ("Terry Wilson" 2009)
  6. Re: [WebDNA] search by range of dates (sbraun 2009)
  7. Re: [WebDNA] search by range of dates (Stuart Tremain 2009)
  8. Re: [WebDNA] search by range of dates ("Terry Wilson" 2009)
  9. Re: [WebDNA] search by range of dates (Govinda 2009)
  10. Re: [WebDNA] search by range of dates (sbraun 2009)
  11. Re: [WebDNA] search by range of dates (Stuart Tremain 2009)
  12. [WebDNA] search by range of dates (sbraun 2009)
It looks good, and you are proving to yourself that the variable is set properly; that's =A0alwa= ys a good idea when problems crop up. Make sure your database actually has some records for the past ten days? And that t= he format in the db is mm/dd/yyyy, not mm/dd/yy, because this won't sort right. (I ran into this recently where = some dates were YY and some were YYYY. They didn't sort right until I made them consistent.)

Also, in your code below,=A0grSKUPdata=3D0 --> where di= d that P come from? maybe this is a typo that's breaking it.=A0

On= Thu, 12 Nov 2009 00:47:57 -0500
sbraun <sbraun1@twcny.rr.com> wrote:
> Hi Terry, I've read the = docs you've mentioned.
> Thank you.
> I've tried your suggestions, along with a dozen other
&g= t;variations, and I either get all the records returned,
>or no records returned.
> This is the current cod= e which returns no records. Am I
>setting the TENDAYSAGO variable wrong? It looks correct
>= ;on my screen.
>
> [text]TENDAYSAGO=3D[math date]{[date]}-10[/math][/text]
> TENDA= YSAGO=3D [TENDAYSAGO] <br>
> [search db=3Dassign_events/
>temp.db&grSKUPdata=3D0&FORMATTED_DATE= type=3Ddate&rnFORMATTED_DATEdatarq=3D
>[TENDAYSAGO] [date]]
>
> I get every past record ret= urned if I use
>{[TENDAYSAGO]}.
> At least it not giving me future dated records anymore.
>
> = Thanks again,
> sfb
>
>
>
> On Nov 12, 2009, at 12:00 AM, Terry Wilson wrote:
&g= t;
>> Yeah a few things. You can't do two fieldnamedata=3Dxx on
>>the same
>> field. Inste= ad, use range. That would be
>> rnfieldnamedatarq=3Dfirstdate seconddate. Also,
>>TENDAYSAGOtyp= e=3Ddate
>> is not valid; not needed. Use that just for the
>>fieldname, as you
>> already= do in FORMATTED_DATEtype=3Ddate. Please refer to
>>the online
>> docs for guidance on searching -- >>http://webdna.us/page.dna?
>> numero=3D69 is a pretty long page, but it has all the info <= br>>>on
>> constructing a search.
>>
>> Terry
>>
>>
>>= On Wed, 11 Nov 2009 23:50:15 -0500
>> sbraun <sbraun1@twcny.rr.com> 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, t= he field name is FORMATTED_DATE:
>> >
>> > [text]TENDAYSAGO=3D[math date]{[date]}-10[/math][/t= ext]
>> > [search db=3D/
>> >temp.db&grSKUdata=3D0&FORMATTED_DATEtype=3Ddate&TENDAYSAG= Otype=3Ddate&leFOR
>> MAT
>> >TED_DATEdatarq=3D[date][!]
>> >
>>[/!]&geFO= RMATTED_DATEdata=3D[TENDAYSAGO]&deFORMATTED_DATEsort=3D1]
>> >
>> > Any ideas for me? Thanks,
>> > sfb
&= gt;> >
>> >
>> > On Nov 11, 2009, at 10:01 PM, Stuart Tremain wrote:
>> >
&= gt;> >> Add this to your search ...
>> >>
>> >> &FIELDNAMEtype=3Ddate>> >>
>> >> 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
>&= gt;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 mailin= g list <talk@webdna.us>.
>> > To unsubscribe, E-mail to: <talk-leave@webdna.us>
>> > = 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=3Dtopics&category=3D288>>
>>
>
> ---------------------------------------------------------
> This me= ssage is sent to you because you are subscribed
>to
> the mailing list <talk@webdna.us>.
> To un= subscribe, E-mail to: <talk-leave@webdna.us>
> 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=3Dtopics&category=3D288

=A0=
"Terry Wilson"

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:

Emailer errors (1997) Nesting format tags (1997) Lost Field (1998) Mac Vs WindowsNT (1997) Generating unique SKU from [cart] (1997) Resetting a Formvariable (2000) Thanks ! (1997) Problems mit mysql (2004) Server capacity (2003) Problem with updating to 2.1.1 (1998) Robots fill event log (1997) Feature req. (2002) foreign languages, email, webcat (1998) multi-paragraph fields (1997) trouble updating records in database (1998) [searchString] (1997) "&" character in Flash animation (2004) [sendmail] and [formvariables] (1997) Optimizing [founditems] (2000) Associative lookup style? + bit more (1997)