Re: Help with dates
This WebDNA talk-list message is from 2001
It keeps the original formatting.
numero = 38263
interpreted = N
texte = Gorana Leahy wrote:> > > > [search db=some.db&eqIDdatarq=[ID]&rnDaydatarq=01/[MyMonth]> > > 31/[MyMonth]&Daytype=date]> >> I tried that and the result is still the same.OK, this time I looked at your code a little closer. How often doesthe month of February (not to mention Sept, April, June, and Nov) have31 days? You are getting March, since 29/02/2001 is actually01/03/2001.This code is never going to work like this. It is also not clear to me why you are using today's date at all. Are you trying to look at sales to the current day in each month? If you want total sales per month, there is unfortunately no way in WebCat to get the last day of the month, but there is a way to get the first day of the next and subtract 1. Try something like this:[loop start=0&end=[math][txtmonths]-1[/math]][text]FirstDay=01/[format Days_To_Date%m/%Y][math date]{01/[index]/0000}[/Math][/format][/text][text]LastDay=01/[format Days_To_Date%m/%Y][math date]{01/[index]+1/0000}-{01/00/0000}[/Math][/format][/text]and use those variables in your rn search (not tested).HTHJohn--John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4720 Boston WayLanham, MD 20706301-459-3366 x.5010fax 301-429-5747-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Gorana Leahy wrote:> > > > [search db=some.db&eqIDdatarq=[ID]&rnDaydatarq=01/[MyMonth]> > > 31/[MyMonth]&Daytype=date]> >> I tried that and the result is still the same.OK, this time I looked at your code a little closer. How often doesthe month of February (not to mention Sept, April, June, and Nov) have31 days? You are getting March, since 29/02/2001 is actually01/03/2001.This code is never going to work like this. It is also not clear to me why you are using today's date at all. Are you trying to look at sales to the current day in each month? If you want total sales per month, there is unfortunately no way in WebCat to get the last day of the month, but there is a way to get the first day of the next and subtract 1. Try something like this:[loop start=0&end=[math][txtmonths]-1[/math]][text]FirstDay=01/[format Days_To_Date%m/%Y][math date]{01/[index]/0000}[/Math][/format][/text][text]LastDay=01/[format Days_To_Date%m/%Y][math date]{01/[index]+1/0000}-{01/00/0000}[/Math][/format][/text]and use those variables in your rn search (not tested).HTHJohn--John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4720 Boston WayLanham, MD 20706301-459-3366 x.5010fax 301-429-5747-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
John Peacock
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:
if else problem (2003)
Repost: Upload file limits (2000)
pop up menu's (1998)
Re[2]: Re[2]: Re[2]: OT: Amazon Patents (2000)
[isfolder] and [filename] (1997)
possible bug in unix version? (2000)
Strange intermittent WebDNA problems (2008)
Sandboxes (2004)
404 error -- but wc code executes... (2001)
UPDATE PROBLEM (1997)
Cleaning up all the shopping carts (2000)
[WebDNA] WebDNA vs. php war ;-) (2010)
WebCat2final1 crashes (1997)
Close-to Comparison Code (1998)
Emailing html (1998)
newbie question about zip code search (2003)
WebCat2b15MacPlugin - showing [math] (1997)
Number searching/formats (1998)
How to pass from a detail page to anothere to another? (1998)
UnacceptedCard in 4.0 (2000)