![]() | |
#1
| |||
| |||
|
|
Folks D3 / NT, and still using AQL (Proc) extensively for reporting. I know, I know I should get a life and learn Basic, Crystal Reports etc etc but for 80% of reports proc is plenty good enough. One minor hassle however - many reports I write have data sorted by date, and the users often want the date broken by week. (As long as the "week" includes the working days Mon-Fri I'm flexible about where Sat and Sun fall - ie the week could be Mon-Sun or Sat-Fri, but Mon-Sun is preferred option. Question, is there a method (synonym?) I can use to get the break-on command to get a string of dates to break nicely each time a week rolls over. (I may have several months worth of dates for example so there will be multiple weeks within the data.) |
#2
| |||
| |||
|
|
Oops - I forgot replacing +1 with -1 will put the saturday and sunday at the end of the week which is what you asked for. Sorry..... "Tom Phillips" <squash (AT) computer (DOT) org> wrote in message news:c7SdnbmuIsg_oUDZnZ2dnUVZ_tCdnZ2d (AT) comcast (DOT) com... One of the nice things about "Pick" dates since 1968 is that the remainder when divided by seven is always the day of week. So assuming attribute 14 contains a date, then F;14;C7;R results in 0 for sunday, 1 for monday, etc.... But more importantly to your needs is that the quotent is a week number So - F;14;C1;+;C7;/ |
#3
| |||
| |||
|
|
John - I answered your query in a prior post, and for longer term reference, I also added a new section to my little web site called "dictionary examples" which has yours plus some others that I've found useful. (...like Google doesn't have enough sites to scan....) http://www.tom-phillips.info/ Regards, Tom... snip |
![]() |
| Thread Tools | |
| Display Modes | |
| |