Re: Help with dates
This WebDNA talk-list message is from 2001
It keeps the original formatting.
numero = 38267
interpreted = N
texte = Will Starck wrote:> > > 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:> >> John, what do you mean by this?> What do I mean by what? Total sales per month = sales for all datesfrom the first of the month to the last day of the month. That wasnot what Gorana was using in the search criteria. The search was looking for sales between the 1st and the 31st of each month, evenfor 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 lastday1 312 283 314 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. Sothe last day of March is the first day of April minus 1.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:
Will Starck wrote:> > > 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:> >> John, what do you mean by this?> What do I mean by what? Total sales per month = sales for all datesfrom the first of the month to the last day of the month. That wasnot what Gorana was using in the search criteria. The search was looking for sales between the 1st and the 31st of each month, evenfor 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 lastday1 312 283 314 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. Sothe last day of March is the first day of April minus 1.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:
Change Subtotal (2000)
[TEST] - Please Ignore (2000)
Problems with ^ could be solved with [REPLACE CHARACTERS] (1997)
Cart Number sequence (1997)
Re(4): Small Bug: ErrorLog.txt/[FORMVARIABLES]/[ORDERFILE] (1998)
using showpage and showcart commands (1996)
Closing Databases (1998)
Discounts: Buy One, Get One =?ISO-8859-1?Q?99=A2?= (2004)
FAX orders (1996)
fresh eyes needed. Append won't work. (2000)
Sending Faxes (2003)
File not found error message (1998)
WebCat B13 Mac CGI -- Frames question (1997)
PCS Frames (1997)
Mail Server Needed. (1998)
Hiding HTML and page breaks (1997)
FYI: virus alert (1996)
Showif, Hideif reverse logic ? (1997)
Separate server for jpg/gif files (1998)
WCS Newbie question (1997)