G'day, There are space saving considerations in going the variable route, the reason I chose the table route was so a person\organisation could change their statistic week ending day at some point in the future and all will still compute correctly.
For instance, I currently finish my week and compute number of programming hours, bills paid, cash on hand and at bank, debtors, creditors etc. at 14:00 hours Thursday. (Which is why each week ending relevant transaction is able to be identified by a stat week ending data.) If I change the stat week ending date in BizMan to be a Friday, all dates in the WE_WK_BP table prior to the change over date are preserved, all those post the change date are dropped and replaced by reference to the text file. This preserves the transactional history relevant to the stat week ending dates appropriate at the time. At 12:44 PM 13/10/2001 -0400, you wrote: >For anyone who doesn't have the new IWK function available, this will give >you the calendar week, ending on Sunday, for any date. First reply >figuring out the logic AND describing it in clear English AND altering it >to return calendar weeks ending on Saturday will up my conference ante by >$10, attributed to her/him. > >SET VAR vDate DATE >SET VAR vWeek INTEGER >SET VAR vDate = <any date> >SET VAR vWeek = (((MOD(JDATE(.vDate),1000)) + 7 - IDWK(.vDate))/7) > > > >Tom Grimshaw <[EMAIL PROTECTED]> wrote: > > >G'day, > > > >Like Troy, I've gone the table route on this one. Warmest regards, Tom Grimshaw coy: Just For You Software tel: 612 9552 3311 fax: 612 9566 2164 mobile: 0414 675 903 post: PO Box 470 Glebe NSW 2037 Australia street: 3/66 Wentworth Park Rd Glebe NSW 2037 email: [EMAIL PROTECTED] web: www.just4usoftware.com.au This email and any files transmitted with it are confidential to the intended recipient and may be privileged. If you have received this email inadvertently or you are not the intended recipient, you may not disseminate, distribute, copy or in any way rely on it. Further, you should notify the sender immediately and delete the email from your computer. Whilst we have taken precautions to alert us to the presence of computer viruses, we cannot guarantee that this email and any files transmitted with it are free from such viruses.
