Re: Date Search
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 55361
interpreted = N
texte = Jesse, I know I'm oversimplifying this, but my first-thing-in-the-morning, barely-got-a-gulp-of-coffee-down-my-throat take on this would be to convert the date as it is to something like [seconds_since_epoch] (or some other benchmark that you prefer) and then subtract 30 minutes worth of seconds from it, all on the fly of course.-DanOn Fri, 9 Jan 2004 07:40:01 -0800 Jesse Proudman
wrote:>>On Jan 9, 2004, at 1:13 AM, Kenneth Grome 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?>>>>>>Can't tell anything from your code because all the important stuff is >>in the include files, but it's clear that it's breaking because the >>day has changed, which means your code is apparently not compensating >>as it should.=>>Like I said, the include files are pretty basic, but here ya go:>>newuserhours is a text variable set in a header. It's current value is: 00:30:00>>timeoffset.inc:>>[math time&show=f]GMT={[date %X]}-{[newuserhours]}[/math][!]>[/!][math time&show=f]NOW={[date %X]}[/math][!]>[/!][if "[offset]"="[raw][offset][/raw]"][!]>[/!][then][!]>[/!][math show=f]offsettime=0[/math][/then][!]>[/!][else][!]>[/!][math show=f]offsettime=[offset]*60[/math][/else][!]>[/!][/if][!]>[/!][math time&show=f]GMTdate=[GMT]+[offsettime][/math][!]>[/!][Format Seconds_To_Time][GMTdate][/Format]>>>-- > Jesse Williams-Proudman>Blue Box Development :: Custom Web Solutions> +1.206.778.8777 :: jesse@blueboxdev.com>> *Happy Holidays*>>>------------------------------------------------------------->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/------------------------------------------------------------http://www.StrongGraphicDesign.comhttp://www.SearchBoise.com(208) 319-0137 | Toll-free p/f 877-561-1656-------------------------------------------------------------------------------------------------------------------------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, I know I'm oversimplifying this, but my first-thing-in-the-morning, barely-got-a-gulp-of-coffee-down-my-throat take on this would be to convert the date as it is to something like [seconds_since_epoch] (or some other benchmark that you prefer) and then subtract 30 minutes worth of seconds from it, all on the fly of course.-DanOn Fri, 9 Jan 2004 07:40:01 -0800 Jesse Proudman wrote:>>On Jan 9, 2004, at 1:13 AM, Kenneth Grome 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?>>>>>>Can't tell anything from your code because all the important stuff is >>in the include files, but it's clear that it's breaking because the >>day has changed, which means your code is apparently not compensating >>as it should.=>>Like I said, the include files are pretty basic, but here ya go:>>newuserhours is a text variable set in a header. It's current value is: 00:30:00>>timeoffset.inc:>>[math time&show=f]GMT={[date %X]}-{[newuserhours]}[/math][!]>[/!][math time&show=f]NOW={[date %X]}[/math][!]>[/!][if "[offset]"="[raw][offset][/raw]"][!]>[/!][then][!]>[/!][math show=f]offsettime=0[/math][/then][!]>[/!][else][!]>[/!][math show=f]offsettime=[offset]*60[/math][/else][!]>[/!][/if][!]>[/!][math time&show=f]GMTdate=[GMT]+[offsettime][/math][!]>[/!][Format Seconds_To_Time][GMTdate][/Format]>>>-- > Jesse Williams-Proudman>Blue Box Development :: Custom Web Solutions> +1.206.778.8777 :: jesse@blueboxdev.com>> *Happy Holidays*>>>------------------------------------------------------------->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/------------------------------------------------------------http://www.StrongGraphicDesign.comhttp://www.SearchBoise.com(208) 319-0137 | Toll-free p/f 877-561-1656-------------------------------------------------------------------------------------------------------------------------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/
"Dan Strong"
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:
Grouping Fields in Context (1999)
RE: [WebDNA] WebSite Examples (2008)
Emailer problem....still (1997)
Sendmail Recipients (2001)
Error (1997)
Shipping.db (1998)
Problems adding stuff to the shopping cart. (1997)
WriteFile Formatting (2000)
!!!!!!!!!!String Search!!!!!!!!!!!!!!!!!! (2001)
Practice runs ? (1997)
TRAINING videos - Prove IT. (1998)
Verifying both name and password (was: THANKS) (1997)
WebTen? (1997)
Processing all html files through WebCat or Typhoon (1998)
Random question (1998)
multi-paragraph fields (1997)
hidden databases (2000)
my price won't move (1997)
Sorry, WebDNA Server Not Running! (2005)
Buying sans cart (1997)