Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DateTime Summary 1

Status
Not open for further replies.

Jesterdog

MIS
Aug 6, 2003
2
US
I need a formula that will add a date/time field together giving me a group total.

Currently the Cutomer_Call_report.duration displays
12/30/99 12:04:34AM

Thus allowing me to see that the rep spent 4 minutes and 34 seconds on the phone call.

I need a way to add all of the time that rep spent on calls for the month and then display in the format HH:MM:SS.

I hope this makes sense and I would really appreciate some help.

Thank You
 
Create a group by employee/rep then by date. with the date group choose to group by month.

The assumption here is that everthing begins at 12/30/99 12:00:00 so create a formula:

{@Duration}
DateDiff("s",DateTime(1999,12,30,12,00,00),{Cutomer_Call_report.duration})

Will Give you the difference in seconds.

Then create another formula (taken from faq767-3543, cheers SV!) :

numberVar dur := Sum({@Duration}, {DateGroup});
numberVar hrs;
numberVar min;
numberVar sec;
stringVar hhmmss;

hrs := Truncate(Truncate(dur/60)/60);
min := Remainder(Truncate(dur/60),60);
sec := Remainder(dur,60);

hhmmss := totext(hrs,0,"") + ":" + totext(min, "00") + ":" + totext(sec, "00");

hhmmss


Place this field in the Date group footer....


Reebo
UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top