amyceres
Technical User
- Mar 28, 2013
- 23
I know that this formula been touch on over and over again but I need help and solving this glitch in my formula There is three parts to this problem This is what I have currently..
For the @ Holidays
I have this formula below however, when I check the formula for errors it keep saying that
"The ) is missing." How many of these are missing?????
So I put the ")" in and the message so that I received was "Too many arguments have been given to this function."
Another thing is that I know that this formula count the numbers of days between the business days...so if current day is 4/2/13 the number of days from between current days and last application day which is 4/1/13 is 2 days including current date. and I was wondering how it would it be possible to show it in date format for the number of business days ( Which would count the current date as 1 day)
Because for the appliciation dates I only want to populate dates from current - 4 business dates.
So if was today was 4/3/13 I only wants to pull up applications date on 3/29/13
So it would be if today was 4/4/13 I only want to pull up dates on 4/1/13
etc etc....
Help is much appreciated....
For the @ Holidays
I have this formula below however, when I check the formula for errors it keep saying that
"The ) is missing." How many of these are missing?????
Code:
BeforeReadingRecords;
DateVar Array Holidays := [
Date (2013,1,1),
Date (2013,1,21),
Date (2013,2,18),
Date (2013,5,27),
Date (2013,7,4),
Date (2013,9,2),
Date (2013,10,14),
Date (2013,11,11),
Date (2013,11,28,
Date (2013,12,25),
Date (2013,12,31),
Date (2014,1,1),
Date (2014,1,20),
Date (2014,2,17),
Date (2014,5,26),
Date (2014,7,4),
Date (2014,9,1),
Date (2014,10,13),
Date (2014,11,11),
Date (2014,11,27),
Date (2014,12,25),
Date (2014,12,31),
Date (2015,1,1),
Date (2015,1,19),
Date (2015,2,16),
Date (2015,5,25),
Date (2015,7,4),
Date (2015,9,7),
Date (2015,10,12),
Date (2015,11,11),
Date (2015,11,26),
Date (2015,12,25),
Date (2015,12,31),
Date (2016,1,1),
Date (2016,1,18),
Date (2016,2,15),
Date (2016,5,30),
Date (2016,7,4),
Date (2016,9,5),
Date (2016,10,10),
Date (2016,11,11),
Date (2016,11,24),
Date (2016,12,25),
Date (2016,12,31)
];
0
So I put the ")" in and the message so that I received was "Too many arguments have been given to this function."
Code:
Date (2016,11,24),
Date (2016,12,25),
Date (2016,12,31)
)];
0
Another thing is that I know that this formula count the numbers of days between the business days...so if current day is 4/2/13 the number of days from between current days and last application day which is 4/1/13 is 2 days including current date. and I was wondering how it would it be possible to show it in date format for the number of business days ( Which would count the current date as 1 day)
Code:
WhilePrintingRecords;
Local DateVar Start := {lt_master.application-dt};
Local DateVar End := currentdate;
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[i] ) in 2 to 6 and
Holidays[i] in start to end then Hol:=Hol+1 );
Weeks + Days - Hol
Because for the appliciation dates I only want to populate dates from current - 4 business dates.
So if was today was 4/3/13 I only wants to pull up applications date on 3/29/13
So it would be if today was 4/4/13 I only want to pull up dates on 4/1/13
etc etc....
Code:
if currentdate= true then {lt_master.application-dt}-{@Weekends)