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

Tallying time values in a report

Status
Not open for further replies.

CCS8DENI

Technical User
Jul 20, 2000
31
0
0
AU
is it possible, in a report, to enter an expression in an unbound box that will vertically tally hours and not represent the result in 24 hour incriments?<br><br>ie 13:00, 7:00 and 10:00 will equal 30:00 not 6:00<br><br>
 
Why don't you just represent the time in that format, then use Left([time],2) on each time you need to add.&nbsp;&nbsp;That would give you just the numbers you need, and you can append the &quot;:00&quot; later if you want.&nbsp;&nbsp;Of course, you would need to use an if conditional testing on the Left() result.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;In other words, if you store the value of the result of the Left() function in a variable &quot;my_time&quot;, you would need something like:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If right(my_time,1) = &quot;:&quot; then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;my_time = left(my_time,1)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end if<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I hope you follow what I'm saying, I would write it all out for you but I don't have the time at the moment.&nbsp;&nbsp;Good luck. =]<br>&nbsp;&nbsp;&nbsp; <p>xtreme1<br><a href=mailto:rbio@excite.com>rbio@excite.com</a><br><a href= > </a><br>
 
I have the same problem.
Is there a way to do a format code on the text box where the results of adding time will be.

I know this is a very old post. But i need the answer please.
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top