Re: Date Search
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 55355
interpreted = N
texte = Jesse, don't mean to use your post as a podium but this is just anothercase of "it would be nice to have [date secs_to_date],[time secs_to_time],[secs_since_epoch].I currently do this using someones code, but have to go through some hoops.See my cryptic test page here for more info:http://www.euca.us/admin/tests/sectodays.htmlWhen evaluating seconds since epoch, important time differences are easy.[!]set date and time in seconds (Tom Dukes code I believe)[/!][text]timestamp=[math]((([math]{[date]}[/math])-1)*86400)+([math]{[time]}[/math])[/math][/text][!] set evaluation time of 30 minutes ago[/!][text]evaltime=[math][timestamp]-(30[!]min[/!]*60)[/math][!] look it up [/!][search db=specs.db&rnDNA_VISIT_DTdatarq=[evaltime] [timestamp]&DNA_VISIT_DTtype=num]This finds your data to the second!Sorry that I can't answer your question.DonovanJesse Proudman wrote:> I've got a database with the dates and times of accesses on a site. I > want to do a search to show all the access on the site in the last 30 > minutes, regardless of the time of day. The following search breaks > between 12:00 am and 12:30 am.... Ideas?> > [search db=^DNAforum/DNAuserspecs.db&eqKEYdatarq=[url][dnakey][/url][if > [getchars > start=1&end=2][time][/getchars]=00][then]&rnDNAvisitdtdatarq=[/ > then][else]&eqDNAvisitdtdatarq=[include > file=^DNAforum/DNAvitals/dateoffset.inc][/else][/ > if]&rnDNAvisittmdatarq=[include > file=^DNAforum/DNAvitals/timeoffset.inc] > [time]&DNAvisitdttype=date&DNAvisittmtype=time&DNAvisitdtsort=1][foundit > ems][DNAuid],[/founditems][/search]> > The time offset file simply figures out what the time would be minus 30 > minutes so at 12:20 that part of the search looks like:> > 23:50:00 00:20:00> > My guess is the search is crapping out because WebDNA doesn't know how > to handle the second integer being smaller than the first. The search > makes logical sense in my head but I guess the parser thinks differently.> > Ideas? :)-- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design <-Web Development (specializing in eCommerce), -> <-Graphic Design, and Pre-Press Consultation -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design N2862 Summerville Park Rd. Lodi, WI 53555 PH:> 1.608.592.3567 Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Jesse, don't mean to use your post as a podium but this is just anothercase of "it would be nice to have [date secs_to_date],[time secs_to_time],[secs_since_epoch].I currently do this using someones code, but have to go through some hoops.See my cryptic test page here for more info:http://www.euca.us/admin/tests/sectodays.htmlWhen evaluating seconds since epoch, important time differences are easy.[!]set date and time in seconds (Tom Dukes code I believe)[/!][text]timestamp=[math]((([math]{[date]}[/math])-1)*86400)+([math]{[time]}[/math])[/math][/text][!] set evaluation time of 30 minutes ago[/!][text]evaltime=[math][timestamp]-(30[!]min[/!]*60)[/math][!] look it up [/!][search db=specs.db&rnDNA_VISIT_DTdatarq=[evaltime] [timestamp]&DNA_VISIT_DTtype=num]This finds your data to the second!Sorry that I can't answer your question.DonovanJesse Proudman wrote:> I've got a database with the dates and times of accesses on a site. I > want to do a search to show all the access on the site in the last 30 > minutes, regardless of the time of day. The following search breaks > between 12:00 am and 12:30 am.... Ideas?> > [search db=^DNAforum/DNAuserspecs.db&eqKEYdatarq=[url][dnakey][/url][if > [getchars > start=1&end=2][time][/getchars]=00][then]&rnDNAvisitdtdatarq=[/ > then][else]&eqDNAvisitdtdatarq=[include > file=^DNAforum/DNAvitals/dateoffset.inc][/else][/ > if]&rnDNAvisittmdatarq=[include > file=^DNAforum/DNAvitals/timeoffset.inc] > [time]&DNAvisitdttype=date&DNAvisittmtype=time&DNAvisitdtsort=1][foundit > ems][DNAuid],[/founditems][/search]> > The time offset file simply figures out what the time would be minus 30 > minutes so at 12:20 that part of the search looks like:> > 23:50:00 00:20:00> > My guess is the search is crapping out because WebDNA doesn't know how > to handle the second integer being smaller than the first. The search > makes logical sense in my head but I guess the parser thinks differently.> > Ideas? :)-- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design <-Web Development (specializing in eCommerce), -> <-Graphic Design, and Pre-Press Consultation -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design N2862 Summerville Park Rd. Lodi, WI 53555 PH:> 1.608.592.3567 Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Donovan Brooke
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:
WebCat2b15MacPlugin - showing [math] (1997)
WebCat2 - Getting to the browser's username/password data (1997)
[WebDNA] shopping sites and the "old commerce tags" (2012)
tcp connect includes (1999)
multiple price line in formula.db (2004)
WebCat2b12--[searchstring] bug (1997)
Relevancy Rating (1998)
Custom WebCat Prefs ... (1997)
webcatalog developers in W. Pa. (1998)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
PIXO Support (1997)
Server Speeds - a whole another world [OT] (2002)
Re:no [search] with NT (1997)
WebCat2 - Getting to the browser's username/password data (1997)
Tax Troubles (2003)
Searchable list archive (1997)
problems with 2 tags (1997)
Removing a character (2000)
[shownext max (1997)
Three new problems, maybe a fourth (1997)