Aggregate time
How I can aggregate TIME?
This is working:
[SUM(StrToTime(<frxMny."idotartam">),MasterData1)]
but the problem is that by this way I'm not able to display more than 24 hours in hh:mm format
for instance: 34:12 -> 34 hours and 12 minutes
This is working:
[SUM(StrToTime(<frxMny."idotartam">),MasterData1)]
but the problem is that by this way I'm not able to display more than 24 hours in hh:mm format
for instance: 34:12 -> 34 hours and 12 minutes
Comments
use plain text and you may have to build your own string from decoded parts.
The problem is that in the case when the time is longer as 48hours it's working false.
Because the starting date is 1899.12.30
+48 hours is 1900.01.01
then my procedure dosn't work..
procedure GroupFooter2OnBeforePrint(Sender: TfrxComponent);
var
aDate: TDateTime;
Year, Month, Day, Hour, Min, Sec, MSec: Word;
begin
aDate:=SUM(StrToTime(<frxMny."idotartam">),MasterData1);
decodedate(aDate, Year, Month, Day);
decodetime(aDate, Hour, Min, Sec, MSec);
hour:=hour+((month-12)*((day-30)*24))+((day-30)*24);
memo25.text:=inttostr(Hour)+':'+inttostr(Min);
end;
Can You help me with a detailed sample?