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:

Problems searching from a FORM (1997) A few questions about server configuration (2000) Using Currencies other than Dollars (1997) File Upload (1997) shipping & multiple comparisons? (2000) Can WebDNA do this? (2000) WebCat with WebTen (1998) How does WebCatalog search the database? (1997) Simple way to create unique SKU (1997) slowness (1998) greater than or equal to (1997) WebDNA 5 - Function test weirdness or ? (2003) send mail problem? (1997) Help name our technology! I found it (1997) Webcat2, WebCommerce, Mod 10 etc. (1997) Shopping Cart variation... (1997) How can I record purchases to a database? (1998) WebCat2b15MacPlugin - [protect] (1997) Proper file locations (1997) A quickie question (1997)