TudorSmith
Programmer
I nee to calculate the average age of a job ticket, based on a ticket.open.time and a ticket.close.time
I currently have the following formula:
Now this formula (plucked from a template report) displays the average "Days" a ticket is open, but how would I make it so I get the average hours:minutes a ticket is open?
Many thanks
birklea birklea ~©¿©~ <><
I know what I know...don't presume that I know what I don't! Smithism!!!
I currently have the following formula:
Code:
DateVar OpenDate := Date({Probsummarym1.open.time});
if isNull({probsummarym1.close.time}) then
DateVar CloseDate := currentdate
else
DateVar CloseDate := Date({Probsummarym1.close.time});
TimeVar OpenTime := Time({Probsummarym1.open.time});
if isNull({probsummarym1.close.time}) then
TimeVar CloseTime := currenttime
else
TimeVar CloseTime := Time({Probsummarym1.close.time});
NumberVar Dys := CloseDate - OpenDate;
NumberVar Secs := CloseTime - OpenTime;
((Dys * 86400) + Secs) / 86400
Now this formula (plucked from a template report) displays the average "Days" a ticket is open, but how would I make it so I get the average hours:minutes a ticket is open?
Many thanks
birklea birklea ~©¿©~ <><
I know what I know...don't presume that I know what I don't! Smithism!!!