I have these formula displaying 2 weekdays date which has data.
04/18/2013 04/19/2013
But I need to change these 2 dates to show current 4 days of data.
eg: today is 16th APril
04/16/2013 04/17/2013 04/18/2013 04 19/2013 (Skipping weekends always.
if todays date is 04/18/2013
Then 04/18/2013 04/19/2013 04/22/2013 04/23/2013
*******weekend formula***************
((datediff ("ww", {TMS_Task.Create_Date}, ({TMS_Task.Create_Date}+3), crsaturday) +
datediff ("ww", {TMS_Task.Create_Date}, ({TMS_Task.Create_Date}+4), crsunday))+ 3 +
{@NoOfDays})
*************Noofdays Formula**********
WhileReadingRecords;
Local DateVar Start := (date({TMS_Task.Create_Date}));
Local DateVar End :=(date({TMS_Task.Create_Date}) +
{@Weekend} + 3);
Local NumberVar Weeks;
Local NumberVar Days;
Local Numbervar Hol;
DateVar Array Holidays;
Weeks:= (Truncate (End - dayofWeek(End) + 1
- (Start - dayofWeek(Start) + 1)) /7 ) * 5;
Days := DayOfWeek(End) - DayOfWeek(Start) + 1 +
(if DayOfWeek(Start) = 1 then -1 else 0) +
(if DayOfWeek(End) = 7 then -1 else 0);
Local NumberVar i;
For i := 1 to Count (Holidays)
do (if DayOfWeek ( Holidays ) in 2 to 6 and
Holidays in start to end then Hol:=Hol+1);
Hol
Edited by vpriyanka2001 - 16 Apr 2013 at 7:04am