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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

selecting time records in Running total 2

Status
Not open for further replies.

aleckonby

Programmer
May 6, 2004
2
US
I am trying to get a running total of all the records that have the time field between 2am and 11:30am. The CallLog.RecvdTime field is actually a string. I have this in the formula of the Evaluate section of the running total wizard:

{CallLog.RecvdTime} > 02:00:00 AND {CallLog.RecvdTime} < 11:30:00

I get this error: "The remaining text does not appear part of the formula."

Any help?
 
If the field is a string you will probably need to insert quotes. Will the > and < work how you want in this situation with strings?
 
OK I thought I got it to work, but it's not. What I'm trying to do is total all calls into 3 groups based on what time they came in. The CallLog.RecvdTime is the time the call came (set as a string though). For the example below, I'm trying to gather all the calls that came in between 02:00:00 and 11:30:00.

{CallLog.RecvdTime} > "02:00:00" AND {CallLog.RecvdTime} < "11:30:00"

Any suggestions?

 
What doesn't work about it? Is it a syntax error? Or is it just not returning the right results?
 
Try using CTime, like this:

CTime({CallLog.RecvdTime}) in [Time(02,00,00) to Time(11,30,00)]

-dave
 
If you want to make calculations by time segments, then instead of using running totals, try creating a formula like:

if time({CallLog.RecvdTime}) in time(02,00,00) to time(11:29:59) then "Shift 1" else
time({CallLog.RecvdTime}) in time(11,30,00) to time(23:59:59) then "Shift 2" else "Shift 3"

Substitute the times you want to cluster, and then group on this formula. You can then insert summaries on fields within the groups to get group totals.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top