Re: Help with dates
This WebDNA talk-list message is from 2001
It keeps the original formatting.
numero = 38270
interpreted = N
texte = Gorana Leahy wrote:> > > What do I mean by what? Total sales per month = sales for all dates> > from the first of the month to the last day of the month. That was> > not what Gorana was using in the search criteria. The search was> > looking for sales between the 1st and the 31st of each month, even> > for months with less than 31 days (so 31 Sept is actually 1 Nov).> >> > There is no way to automatically get the last day of a month from> > WebCat. You could just have a lookup table:> >> > month lastday> > 1 31> > 2 28> > 3 31> > 4 30> > ...> >> > but unfortunately, this doesn't cover leap years. It is easier to> > use the built in month logic which WebCat does have and back off. So> > the last day of March is the first day of April minus 1.> >> > John> >> Hi again> > I think that the date range doesn't make a difference. My sums for total for> each month are correct, but the problem is in the way that I am taking a> month away from todays date and with that I am skiping February.> I think.> Gorana> The date range selects the records to summarize. The totals are only correct if you don't have any sales on that extra day (or three) for each month with less than 31 days in it. You are not skipping February;your formula is wrong and you are getting into March without realizing it. Try using my code for FirstDay and LastDay and use those in thesearch.John--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:> > > What do I mean by what? Total sales per month = sales for all dates> > from the first of the month to the last day of the month. That was> > not what Gorana was using in the search criteria. The search was> > looking for sales between the 1st and the 31st of each month, even> > for months with less than 31 days (so 31 Sept is actually 1 Nov).> >> > There is no way to automatically get the last day of a month from> > WebCat. You could just have a lookup table:> >> > month lastday> > 1 31> > 2 28> > 3 31> > 4 30> > ...> >> > but unfortunately, this doesn't cover leap years. It is easier to> > use the built in month logic which WebCat does have and back off. So> > the last day of March is the first day of April minus 1.> >> > John> >> Hi again> > I think that the date range doesn't make a difference. My sums for total for> each month are correct, but the problem is in the way that I am taking a> month away from todays date and with that I am skiping February.> I think.> Gorana> The date range selects the records to summarize. The totals are only correct if you don't have any sales on that extra day (or three) for each month with less than 31 days in it. You are not skipping February;your formula is wrong and you are getting into March without realizing it. Try using my code for FirstDay and LastDay and use those in thesearch.John--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:
RE: 2nd WebCatalog2 Feature Request (1996)
Simple way to create unique SKU (1997)
SendMail context not working on CentOS 4 (2007)
Search Question (1998)
WC2b15 File Corruption (1997)
WebDNA Developers' Network ---- Thank you (2002)
Multiple cart additions (1997)
cart (1997)
Error: this shopping cart has already been submitted and been (2006)
Help name our technology! (1997)
[ot] Stopping Apple's Log Rolling (2004)
Signal Raised Error (1997)
creating a ShipCosts database (1997)
test for John (1999)
Requiring that certain fields be completed (1997)
WC2b15 File Corruption (1997)
Country & Ship-to address & other fields ? (1997)
Dummy Credit Card Number for debug? (1997)
Generating Report Totals (1997)
Another question about credit cards (1997)