I am currently writing a report in Crystal 10 and I am using a formula to get statistics for our support site on how long a ticket is open. This is a SQL Database.
I am using this formula and I am assuming that it is not working because my date field isnt in DateVar format.
WhileReadingRecords;
Local DateVar Start := {Cases.CreateDate};
Local DateVar End := {Cases.UpdateDate};
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 Holidays in start to end then Hol:=Hol+1 );
Weeks + Days - Hol
BeforeReadingRecords;
DateVar Array Holidays := [
Date (2004,12,24),
Date (2005,01,03),
Date (2004,11,25),
Date (2004,11,26)
];
0
Is there a formula that I can use to change the {Cases.CreateDate} from a Date/Time to a DateVar?
Thanks,
Chris
I am using this formula and I am assuming that it is not working because my date field isnt in DateVar format.
WhileReadingRecords;
Local DateVar Start := {Cases.CreateDate};
Local DateVar End := {Cases.UpdateDate};
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 Holidays in start to end then Hol:=Hol+1 );
Weeks + Days - Hol
BeforeReadingRecords;
DateVar Array Holidays := [
Date (2004,12,24),
Date (2005,01,03),
Date (2004,11,25),
Date (2004,11,26)
];
0
Is there a formula that I can use to change the {Cases.CreateDate} from a Date/Time to a DateVar?
Thanks,
Chris