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 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-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 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:

    
  1. Re: Help with dates (John Peacock 2001)
  2. Re: Help with dates (Gorana Leahy 2001)
  3. Re: Help with dates (Gorana Leahy 2001)
  4. Re: Help with dates (John Peacock 2001)
  5. Re: Help with dates (Will Starck 2001)
  6. Re: Help with dates (John Peacock 2001)
  7. Re: Help with dates (Tom Duke 2001)
  8. Re: Help with dates (Tom Duke 2001)
  9. Re: Help with dates (Gorana Leahy 2001)
  10. Re: Help with dates (John Peacock 2001)
  11. Help with dates (Gorana Leahy 2001)
  12. Re: HELP WITH DATES (Kenneth Grome 1997)
  13. Re: HELP WITH DATES (Jim Shaughnessy 1997)
  14. Re: HELP WITH DATES (John Hill 1997)
  15. Re: HELP WITH DATES (grichter@panavise.com (Gary Richter) 1997)
  16. Re: HELP WITH DATES (Jim Shaughnessy 1997)
  17. Re: HELP WITH DATES (Grant Hulbert 1997)
  18. Re: HELP WITH DATES (Kenneth Grome 1997)
  19. HELP WITH DATES (John Hill 1997)
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 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-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 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:

Show shoppingcart after remove last item (1997) Size limit for tmpl editor ? (1997) PIXO support (1997) WebCatalog 4 Install Problems (2000) HomePage Caution (1997) Validation (2000) RE: Error: template (1997) Part Html part WebDNA (1997) RE: Suggestions for Topics to be covered in an Advanced WebDNACourse... (1998) Replace context problem ... and answers (1997) Emailer help....! (1997) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) triggers.db (1999) redirect within the ErrorMessages.db (2003) Using Plug-In while running 1.6.1 (1997) A quickie question (1997) [sendmail]- bcc? (1998) Country & Ship-to address & other fields ? (1997) problems with 2 tags (1997) Strange intermittent WebDNA problems (2008)