Re: Dates
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 19360
interpreted = N
texte = >Hi Folks,>I set up a test .db with start_date and end_date entries all in mm/dd/yyyy.>On a sample search when I try to do a search for todays events , i.e. date>range search using>[Search db=dkmweb.db&lestart_datedatarq=[math>DATE]{[Date]}[/math]&geEnd_datedatarq=[math>DATE]{[Date]}[/math]&Start_datetype=DATE&End_datetype=DATE]>I get no matches and if I remove the 'rq' parts of the context i get all>results.>Can anybody point out the error of my ways:-)Your dates are stored as mm/dd/yyyy, but you are converting your searchvalues to 'days since 00/00/0000'.Try this:[Searchdb=dkmweb.db&lestart_datedatarq=[Date]&geEnd_datedatarq=[Date]&Start_datetype=DATE&End_datetype=DATE]Better yet, store your dates as 'days since 00/00/0000'. It will make yoursearches MUCH faster. In that case, remove the 'type=DATE' parameters fromyour search.---Trevor CristDigital FrontierStowe, Vermont802.253.8612http://www.digitalfrontier.com
Associated Messages, from the most recent to the oldest:
>Hi Folks,>I set up a test .db with start_date and end_date entries all in mm/dd/yyyy.>On a sample search when I try to do a search for todays events , i.e. date>range search using>[Search db=dkmweb.db&lestart_datedatarq=[math>DATE]{
[date]}[/math]&geEnd_datedatarq=[math>DATE]{
[date]}[/math]&Start_datetype=DATE&End_datetype=DATE]>I get no matches and if I remove the 'rq' parts of the context i get all>results.>Can anybody point out the error of my ways:-)Your dates are stored as mm/dd/yyyy, but you are converting your searchvalues to 'days since 00/00/0000'.Try this:[Searchdb=dkmweb.db&lestart_datedatarq=
[date]&geEnd_datedatarq=
[date]&Start_datetype=DATE&End_datetype=DATE]Better yet, store your dates as 'days since 00/00/0000'. It will make yoursearches MUCH faster. In that case, remove the 'type=DATE' parameters fromyour search.---Trevor CristDigital FrontierStowe, Vermont802.253.8612http://www.digitalfrontier.com
Trevor Crist
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:
error message (1998)
server 2003 weirdness (2004)
Encrypt a page/template (2002)
Ad Serving Software (2002)
Upgrading old WebCat Database Files (1997)
RE: problem with applets embedded in tpl files (1997)
Further on formula.db failure to calculate shipCost (1997)
Custom formulas.db (1998)
when is failing to [URL]ize values in a comparison risky? (1999)
Setting user/password with a form. (2000)
japanese characters (1997)
math a various prices (1997)
Redirect in 4.0 (2000)
WebCatalog Mac and cgi-bin (WebSTAR 2.0) (1997)
Multi-processor Mac info ... (1997)
Cart Creation (2003)
Nested tags count question (1997)
Date Math (1999)
Help! WebCatalog not writing dbs to disk (2001)
Serving images from databases (1998)