Shirley,
I tried the altered formula and it still seems the same except now the report is grouping on multiple days instead of weeks. What I found wrong is so simple if I would have studied a calander a little bit. The "01/01/01" date reference is the problem. It throws some due dates into the next week because it "01/01/01" isn't the first day of the week. By changing the reference date to "12/31/00" all the due dates show in the proper week. The only problem now is I need to change the formula to subtract 52 from the week numbers after 52 weeks or after the first week of the year, change the date reference to "12/30/01", and all weeks after week 1 will be correct.
Thanks for all the help
dennis
I tried the altered formula and it still seems the same except now the report is grouping on multiple days instead of weeks. What I found wrong is so simple if I would have studied a calander a little bit. The "01/01/01" date reference is the problem. It throws some due dates into the next week because it "01/01/01" isn't the first day of the week. By changing the reference date to "12/31/00" all the due dates show in the proper week. The only problem now is I need to change the formula to subtract 52 from the week numbers after 52 weeks or after the first week of the year, change the date reference to "12/30/01", and all weeks after week 1 will be correct.
Thanks for all the help
dennis
----- Original Message -----
From: Shirley Graver
To: vantage@yahoogroups.com
Sent: Wednesday, December 19, 2001 9:56 AM
Subject: RE: [Vantage] Rb date formula
Dennis,
Ok here goes,
In the formula section "IIF((JobHead.ReqDueDate -
DATE("01/01/01")) Modulo 7 =0
The formula is asking if the remainder of 9/11/01 minus 01/01/01
has a remainder of ZERO then use the first formula, if not use the second
formula.
The first formula " 09/01/01 minus 01/01/01 equals 253 days, the 253 days
is then divided by 7 which equals 36 or week 36."
The second formula ), (TRUNCATE((JobHead.ReqDueDate - DATE("01/01/01")) /
7,0) + 1)) is really the same formula as the first except that this part
"TRUNCATE((JobHead.ReqDueDate - DATE("01/01/01")) / 7,0)" is only used if
the remainder is NOT zero. The calculation is then TRUNCATED to zero
decimal places. IE: if (JobHead.ReqDueDate - DATE("01/01/01")) actually
equaled 242.56 days, then the formula would TRIM off the .56 days then add a
WHOLE DAY to the formula. And as I typed that last sentence I saw the error
in the formula. The formula should actually be
IIF((JobHead.ReqDueDate - DATE("01/01/01")) Modulo 7
=0,((JobHead.ReqDueDate - DATE("01/01/01")) /
7),(TRUNCATE(JobHead.ReqDueDate - DATE("01/01/01"),0) + 1) / 7)
This formula adds a DAY when the calculation is not zero, the other
calculation adds a WEEK when the calculation is not zero.
Maybe this is why your weeks are off dennis.
Shirley H. Graver
(End User)
Systems Administrator
Rubber Associates Inc.
-----Original Message-----
From: Dennis Houghton [mailto:dennis@...]
Sent: Wednesday, December 19, 2001 9:42 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Rb date formula
I would appreciate some help with this formula.
I have a Rb report I created that uses this formula to group jobs due by the
week of the year. Their are some dates show up that should be in the
preceding week. I can't see any logical reason for this. I don't exactly
understand how you add/subtract dates and convert to weeks of the year.
Would someone please break this formula down and explain it for me. I don't
understand what Modulo 7 does, how many places is TRUNCATE, from what end?
IIF((JobHead.ReqDueDate - DATE("01/01/01")) Modulo 7 =
0,((JobHead.ReqDueDate - DATE("01/01/01")) /
7),(TRUNCATE((JobHead.ReqDueDate - DATE("01/01/01")) / 7,0) + 1))
I know this is elementary to a lot of you but I would appreciate any help.
Thanks
[Non-text portions of this message have been removed]
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://rd.yahoo.com/M=178320.1681224.3270152.1261774/D=egroupweb/S=17050071
83:HM/A=879173/R=0/*http://www.fastweb.com/ib/yahoo-76f>
Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/links
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
Yahoo! Groups Sponsor
Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/links
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]