Time comparison question

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 17757
interpreted = N
texte = This one should be easy, but...I want to show something only if at least one hour has transpired since the last user access. This code works fine as long as I am not within an hour of midnight. In that case, it compares the post-midnight time to the current time and gives a false positive. I hope I am just missing something really obvious.[showif [math time]{[time]}[/math]>[math time]{[lookup db=offshore.db&lookinField=user&value=[uppercase][username][/uppercase]&returnField=lastaccesstime]}+{01:00:00}[/math]]Show this only if the current time is at least one hour later than the last access time.[/showIf]-- Gil Poulsen, Webmaster************************************************************** * AltiM@c * Phone: (732) 469-2567 * * 429 St. Giles Court * FAX: (732) 469-5823 * * Somerset, NJ * e-mail: help@altimac.com * * 08873 * WWW: http://www.altimac.com * ************************************************************** Associated Messages, from the most recent to the oldest:

    
  1. Re: Time comparison question (Gil Poulsen 1998)
  2. Re: Time comparison question (Peter Ostry 1998)
  3. Time comparison question (Gil Poulsen 1998)
This one should be easy, but...I want to show something only if at least one hour has transpired since the last user access. This code works fine as long as I am not within an hour of midnight. In that case, it compares the post-midnight time to the current time and gives a false positive. I hope I am just missing something really obvious.[showif [math time]{[time]}[/math]>[math time]{[lookup db=offshore.db&lookinField=user&value=[uppercase][username][/uppercase]&returnField=lastaccesstime]}+{01:00:00}[/math]]Show this only if the current time is at least one hour later than the last access time.[/showIf]-- Gil Poulsen, Webmaster************************************************************** * AltiM@c * Phone: (732) 469-2567 * * 429 St. Giles Court * FAX: (732) 469-5823 * * Somerset, NJ * e-mail: help@altimac.com * * 08873 * WWW: http://www.altimac.com * ************************************************************** Gil Poulsen

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:

Running _every_ page through WebCat-error.html (1997) Comments in db? (1997) Shopping Cart - prices? (1997) Problems getting parameters passed into email. (1997) Foreign Chars (יאצה and so on) (1998) [showif] based on data from [tcpconnect][tcpsend]? (2000) Adding Multiple Items to Shopping Cart from a Results page (1997) Upgrade Docs (2000) Re:quit command on NT (1997) listfiles-looking for slick solution (1997) [shell]? (2000) OT: corrupted images (2002) WebCat2b12 CGI Mac -- Problems propagating the cart through (1997) WebCat2b13MacPlugin - nested [xxx] contexts (1997) Email (1998) Smart caching problems with 2.1b3? (1997) [TaxableTotal] - not working with AOL and IE (1997) OK, here goes... (1997) emailer settings and control questions (1997) WebCatalog/Mac 2.1b2 New Features (1997)