FireGeek21
Technical User
I am adopting a formula from Ken Hamady (thank you Ken) that looks at the number of work days between two dates. My adoption is just getting the week number between two dates as follows:
WhileReadingRecords;
Local DateVar Start := Date(2009, 01, 01);
Local DateVar End := CurrentDate;
Local NumberVar Weeks;
Weeks:= (Truncate ( (End - DayOfWeek(End) + 1) - (Start - DayOfWeek(Start) + 1) ) /7 );
This is returning 84.00 and I want only 84. This is for a fixed field file so using the field formating is not an option.
Why isn't Truncate working? Round works but I really don't want it to actually Round, just want it to drop the zero's after the decimal.
Thanks!
FireGeek
(currently using Crystal Reports XI with Lawson 8.03)
WhileReadingRecords;
Local DateVar Start := Date(2009, 01, 01);
Local DateVar End := CurrentDate;
Local NumberVar Weeks;
Weeks:= (Truncate ( (End - DayOfWeek(End) + 1) - (Start - DayOfWeek(Start) + 1) ) /7 );
This is returning 84.00 and I want only 84. This is for a fixed field file so using the field formating is not an option.
Why isn't Truncate working? Round works but I really don't want it to actually Round, just want it to drop the zero's after the decimal.
Thanks!
FireGeek
(currently using Crystal Reports XI with Lawson 8.03)