Re: Date Math

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 61836
interpreted = N
texte = Eddie Z wrote: I need to know how much time there is in between the date of a page load > and a date read from a database in years, months, days, hours, minutes and > seconds. > > My database is broken down as follows: > ID# > Eyr > Emon > Eday > Ehr > Emin > Esec Eddie, Well, I don't do "Computer Security" but maybe I can help you out?? ;-) You need "Seconds Since Epoch" for this. I use some ammended code originating from Tom Duke (thanks Tom). There is no need to have all those fields in your database really... You could get by with: ID PAGE DT_STAMP When page is hit, append to the .db the "seconds-since-epoch"... To tell the difference between now and the appended data, format the curent date and time to seconds since epoch.. subtract the ..db value from it, then convert that number back to years, months, days, hrs, min, sec etc.... To find the code to do this, do some research in the archives. HTH, Donovan---Slaveman~4~MyNewPuppy. -- =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, Custom Tags and Labels -> 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:

    
  1. Re: Date Math broken on Mac OS X 10.4? ( Tom Duke 2007)
  2. Re: Date Math broken on Mac OS X 10.4? ( Paul Willis 2007)
  3. Re: Date Math broken on Mac OS X 10.4? ( Tom Duke 2007)
  4. Date Math broken on Mac OS X 10.4? ( Paul Willis 2007)
  5. Re: Date Math ( Patrick McCormick 2005)
  6. Re: date math ( Donovan Brooke 2005)
  7. Re: date math ( Dave Hurley 2005)
  8. Re: Date Math ( Donovan Brooke 2005)
  9. Re: Date Math ( "Allen" 2005)
  10. Date Math ( Eddie Z 2005)
  11. Re: date math [2.x] (Aaron Lynch 1999)
  12. Re: date math [2.x] (PCS Technical Support 1999)
  13. Re: date math [2.x] (Marty Schmid 1999)
  14. Re: Date Math (Kenneth Grome 1999)
  15. Re: Date Math (Will Starck 1999)
  16. Re: Date math format (PCS Technical Support 1998)
  17. Re: Date Math bug (Dale LaFountain 1998)
  18. Re: Date Math bug (John Hill 1998)
  19. Re: Date math (Michael Winston 1997)
  20. Re: Webcat 2.0.1 date math bug -> Crash! (wahl@dnai.com (Bernt Wahl) 1997)
  21. Re: Webcat 2.0.1 date math bug -> Crash! (Kenneth Grome 1997)
  22. Webcat 2.0.1 date math bug -> Crash! (Dale LaFountain 1997)
  23. Problems with date math (Michael Winston 1997)
  24. Re: Problems with date math (Olin 1997)
  25. Re: Problems with date math (Grant Hulbert 1997)
Eddie Z wrote: I need to know how much time there is in between the date of a page load > and a date read from a database in years, months, days, hours, minutes and > seconds. > > My database is broken down as follows: > ID# > Eyr > Emon > Eday > Ehr > Emin > Esec Eddie, Well, I don't do "Computer Security" but maybe I can help you out?? ;-) You need "Seconds Since Epoch" for this. I use some ammended code originating from Tom Duke (thanks Tom). There is no need to have all those fields in your database really... You could get by with: ID PAGE DT_STAMP When page is hit, append to the .db the "seconds-since-epoch"... To tell the difference between now and the appended data, format the curent date and time to seconds since epoch.. subtract the ..db value from it, then convert that number back to years, months, days, hrs, min, sec etc.... To find the code to do this, do some research in the archives. HTH, Donovan---Slaveman~4~MyNewPuppy. -- =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, Custom Tags and Labels -> 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:

duplicate cart numbers (2002) [thisurl] or another way (2000) WebDNA Freelancer Needed (2002) searchable list archive (1997) using WebCat for Associate Programs? (1998) For you Unix gurus [OT] (2002) NT version and O'reily's WebSite (1997) searching within same page (2000) I think WebDNA-Talk died ... :( (1997) problems with 2 tags (1997) OH CRAP!!!!!- Template not found error!!! (1999) Time Tracking (2003) [WebDNA] Sorry WebDNA server not running (2014) Weird problems with [SHOWIF]s (1997) Been meaning to ask... (1997) RE: E-mailer error codes (1997) jpeg upload compression (2002) Hiding a subsection of text (2002) searching multiple databases in single search (1997) RE:It just Does't add up!!! (1997)