Re: Time comparison question

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 17762
interpreted = N
texte = Gil Poulsen changed the universe:> 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... You have to include the date, otherwise WebCat has no chance to know when a new day starts. [math]{[date]}[/math]*100000+[math]{[time]}[/math] That delivers a number like 72989316158.How it works: It calculates the days since 0/0/00, multiplies by 100000 to make room for the time and adds the seconds since midnight.Peter __________________________________________ Peter Ostry - po@ostry.com - www.ostry.com Ostry & Partner - Ostry Internet Solutions Auhofstrasse 29 A-1130 Vienna Austria fon ++43-1-8777454 fax ++43-1-8777454-21 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)
Gil Poulsen changed the universe:> 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... You have to include the date, otherwise WebCat has no chance to know when a new day starts. [math]{[date]}[/math]*100000+[math]{[time]}[/math] That delivers a number like 72989316158.How it works: It calculates the days since 0/0/00, multiplies by 100000 to make room for the time and adds the seconds since midnight.Peter __________________________________________ Peter Ostry - po@ostry.com - www.ostry.com Ostry & Partner - Ostry Internet Solutions Auhofstrasse 29 A-1130 Vienna Austria fon ++43-1-8777454 fax ++43-1-8777454-21 Peter Ostry

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:

FlushDatabase Suggestion (1998) Next (1997) Cart Numbers (1997) serial number generation (1997) webcat2b12 CGI -- Date comparisons (1997) verify email address (1998) Where is the secure setting for text variables? (2003) Banner DNA (1997) WC2.0 Memory Requirements (1997) NewCart+Search with one click ? (1997) Next X hits (1996) [WebDNA] Anyone have a unix epoch converter? (2016) Logical and or in [hideif] (1997) Ok here is a question? (1997) Review comparison by PC Magazine: Open for On-line Business (1997) no global [username] or [password] displayed ... (1997) CERT Advisory on malicious scripts (2000) OT : Site speed feedback (2002) Is this possible, WebCat2.0 and checkboxes (1997) WebCat2: multiple currency support (1997)