Fun with Dates - revisited (again)

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 14568
interpreted = N
texte = Hello Grant, Remember the issue we were having with date searches from a pulldown? If not I've copied one of the old threads below. At that point in time (back in July) you thought that it was a bug that John would have fixed in the next release. Anyway the problem still exists with 2.0, 2.01 as well as 2.1b2 (Mac). Maybe my code is still screwed up but it seems to work fine for searches that do not span across the end of the year.Here's the earlier thread (7/15/97) that describes the problem and Ken's comments regarding this issue.----------------------------------------------->Hey Grant, >Remember that problem I was having with weird returns using pull-downs - >the one where I'm >really am trying not to say BUG?? Well it still exists >so I need to figure what's happening. >I've posted a sample of the >problem at http://www.gosandiego.com/bIndex.tmpl>Here's a recap of the earlier post regarding this problem:>>Anyway here's my code which works for the most part: >> >> days.
>> >> >>And here's the problem: As I test the various pull-down options everthing >>appears to work fine - I get a small number of records with start dates in >>the next month, a greater number in the next 2 months etc. until I hit the >>6 month/180 days option. For whatever reason it coughs and only gives me >>only 2-3 records instead of all the records that had been found with the >>earlier options as it should... Any ideas?? > >Ken wrote: Thanks for your excellent description of the 'anomaly', Marty. > >It just so happens that the 6 month/180 day option is dealing with a new >year - 1998 - whereas all the others options are dealing with dates in 1997 >... so maybe there's something going on when the year changes. I think >what's happening is that the 180 day option is looking at records less >than January 8, 1997 instead of less than January 8, 1998. > >Grant, what do you think about this possibility? (Don't worry, I'm not >gonna call this one a bug, I learned my lesson the last time ... :) >>-ok more testing- >I think Ken's on to something with it being new year related... I added >another option, one for 7 months/210 days that behaves similarily as the 6 >month/120 days option but it actually picks up one more record than the 6 >>month option. When I search using the 6 month option I get 3 records - all >with a start date of 01/01/1997. The 7 month option adds in a record with a >start date of 02/04/1997. These searches should really be finding records >through till these dates in 1998. So it appears that when the math does its >addition it is not causing the year to roll over to the next year. I'm >getting more tempted but I'm still not calling this a bug - until Ken does...>BTW I'm running WC 2.0 w/ webstar 2.0 on a PMac 9500.-----------------------------------------------The sample template is still at that URL, or you can see the problem live at http://www.gosandiego.com/index.tmpl Just do a quick search and you'll notice you'll find less events by searching 60 days out than just 30 days out.Thanks as always -marty ____________________________________ | Marty Schmid | | -Artwerks- | | Design/Advertising/Web Publishing | | | | T. 619.274.5029 | | F. 619.274.5656 | | e-mail: marty@artwerks.com | |____________________________________| Associated Messages, from the most recent to the oldest:

    
  1. Fun with Dates - revisited (again) (Marty Schmid 1997)
Hello Grant, Remember the issue we were having with date searches from a pulldown? If not I've copied one of the old threads below. At that point in time (back in July) you thought that it was a bug that John would have fixed in the next release. Anyway the problem still exists with 2.0, 2.01 as well as 2.1b2 (Mac). Maybe my code is still screwed up but it seems to work fine for searches that do not span across the end of the year.Here's the earlier thread (7/15/97) that describes the problem and Ken's comments regarding this issue.----------------------------------------------->Hey Grant, >Remember that problem I was having with weird returns using pull-downs - >the one where I'm >really am trying not to say BUG?? Well it still exists >so I need to figure what's happening. >I've posted a sample of the >problem at http://www.gosandiego.com/bIndex.tmpl>Here's a recap of the earlier post regarding this problem:>>Anyway here's my code which works for the most part: >> >> days.
>> >> >>And here's the problem: As I test the various pull-down options everthing >>appears to work fine - I get a small number of records with start dates in >>the next month, a greater number in the next 2 months etc. until I hit the >>6 month/180 days option. For whatever reason it coughs and only gives me >>only 2-3 records instead of all the records that had been found with the >>earlier options as it should... Any ideas?? > >Ken wrote: Thanks for your excellent description of the 'anomaly', Marty. > >It just so happens that the 6 month/180 day option is dealing with a new >year - 1998 - whereas all the others options are dealing with dates in 1997 >... so maybe there's something going on when the year changes. I think >what's happening is that the 180 day option is looking at records less >than January 8, 1997 instead of less than January 8, 1998. > >Grant, what do you think about this possibility? (Don't worry, I'm not >gonna call this one a bug, I learned my lesson the last time ... :) >>-ok more testing- >I think Ken's on to something with it being new year related... I added >another option, one for 7 months/210 days that behaves similarily as the 6 >month/120 days option but it actually picks up one more record than the 6 >>month option. When I search using the 6 month option I get 3 records - all >with a start date of 01/01/1997. The 7 month option adds in a record with a >start date of 02/04/1997. These searches should really be finding records >through till these dates in 1998. So it appears that when the math does its >addition it is not causing the year to roll over to the next year. I'm >getting more tempted but I'm still not calling this a bug - until Ken does...>BTW I'm running WC 2.0 w/ webstar 2.0 on a PMac 9500.-----------------------------------------------The sample template is still at that URL, or you can see the problem live at http://www.gosandiego.com/index.tmpl Just do a quick search and you'll notice you'll find less events by searching 60 days out than just 30 days out.Thanks as always -marty ____________________________________ | Marty Schmid | | -Artwerks- | | Design/Advertising/Web Publishing | | | | T. 619.274.5029 | | F. 619.274.5656 | | e-mail: marty@artwerks.com | |____________________________________| Marty Schmid

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:

RE: Problems with shopping cart (1997) [numfound] in nested [search] (2000) WebCat & WebTen (1997) international time (1997) Tea Room trouble (1997) RePost: NAT and the CART (1999) Yosemite and 8.1??? (1999) New public beta available (1997) SiteBuilder Problem (2004) WebCat cannot handle compatible search parameters? (1997) searching twice on same field (1998) What about the fixes that were promised for 5.2 ? (2004) POP Mail Server reseting (1998) Needed, Freelance Web Developer (2007) form crasehes server (1997) Searching multiple fields from one form field (1997) Re:Signal Raised (1997) Variables for chat (1997) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) Can't Update records (1997)