Re: [WebDNA] search by range of dates
This WebDNA talk-list message is from 2009
It keeps the original formatting.
numero = 103991
interpreted = N
texte = > 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&leFORMATTED_DATEdatarq=[date][!]> [/!]&geFORMATTED_DATEdata=[TENDAYSAGO]&deFORMATTED_DATEsort=1]>> Any ideas for me? Thanks,> sfbI always had better luck using the range comparison operators over the greater/less than ones.try this:[search db=/ temp .db &grSKUdata = 0 &FORMATTED_DATEtype =date&TENDAYSAGOtype=date&xrFORMATTED_DATEdatarq=[date][!][/!]&mrFORMATTED_DATEdatarq=[TENDAYSAGO]&deFORMATTED_DATEsort=1]-----------------if still no luck then:(just some ideas)- make sure everything is even evaluating the way you think it is.. put this is in your page and see what it looks like when you hit it:- -also what is [numfound] showing?- How are you determining that the search is failing?- are the values in the temp.db for the [FORMATTED_DATE] field in the same date format as what you have told your server is the default [date] format?------------Govindagovinda.webdnatalk@gmail.com
Associated Messages, from the most recent to the oldest:
> 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&leFORMATTED_DATEdatarq=
[date][!]> [/!]&geFORMATTED_DATEdata=[TENDAYSAGO]&deFORMATTED_DATEsort=1]>> Any ideas for me? Thanks,> sfbI always had better luck using the range comparison operators over the greater/less than ones.try this:[search db=/ temp .db &grSKUdata = 0 &FORMATTED_DATEtype =date&TENDAYSAGOtype=date&xrFORMATTED_DATEdatarq=
[date][!][/!]&mrFORMATTED_DATEdatarq=[TENDAYSAGO]&deFORMATTED_DATEsort=1]-----------------if still no luck then:(just some ideas)- make sure everything is even evaluating the way you think it is.. put this is in your page and see what it looks like when you hit it:- -also what is [numfound] showing?- How are you determining that the search is failing?- are the values in the temp.db for the [FORMATTED_DATE] field in the same date format as what you have told your server is the default
[date] format?------------Govindagovinda.webdnatalk@gmail.com
Govinda
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:
[ShowIf] and empty fields (1997)
make updates in a temporary database (2004)
URL for Discussion Archive (1997)
WebCat2 - storing unformatted date data? (1997)
Requiring that certain fields be completed (1997)
Secure server question (1997)
taxrate - off by 1 cent (1997)
Emailer setup (1997)
append=T problem (1998)
Webcat 2.0.1b1 bug with IE 3.01/4.0p1 (1997)
Two submit buttons ? (1997)
two part electronic product (1998)
WebCat cannot handle compatible search parameters? (1997)
WebCatalog Features (1997)
Plugin or CGI or both (1997)
Tab Charactor (1997)
Nav. 4 probs with cart - Serious problem (1997)
Recycling fee (1998)
WebMerchant setup (1998)
Possible Bug in 2.0b15.acgi (1997)