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 thelast user access. This code works fine as long as I am not within an hour ofmidnight. In that case, it compares the post-midnight time to the current timeand gives a false positive. I hope I am just missing something really obvious.[showif [math time]{[time]}[/math]>[math time]{[lookupdb=offshore.db&lookinField=user&value=[uppercase][username][/uppercase]&returnField=lastaccesstime]}+{01:00:00}[/math]]Showthis 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:
This one should be easy, but...I want to show something only if at least one hour has transpired since thelast user access. This code works fine as long as I am not within an hour ofmidnight. In that case, it compares the post-midnight time to the current timeand gives a false positive. I hope I am just missing something really obvious.[showif [math time]{
[time]}[/math]>[math time]{[lookupdb=offshore.db&lookinField=user&value=
[uppercase][username][/uppercase]&returnField=lastaccesstime]}+{01:00:00}[/math]]Showthis 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)