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

format time value greater than 24 hours in access report 1

Status
Not open for further replies.

dutch6

Technical User
Feb 3, 2004
20
GB
Im creating a timesheet database when staff work hours are calculated, daily and then weekly.

does anyone know how to format a textbox in a report to display a time value that is greater than 24hours for the weeky figure?

by default when access gets past 24hours it starts at zero again.
 
hmm, I thought format(blah, "hh") does that...

you could always try working it out...
hours = day(blah) * 24 + format(blah, "hh")...
 
you are right that "hh:mm" formats to hours and minutes, but its works on a 24 hour clock. i will try the working out bit
 
no, hot "hh:mm"

try using just "hh", I think that'll convert your days into hours... although I'm not 100% sure, and I'm too lazy to test it out myself...
 
When hours exceed 24 the DAY "rolls", so 25 hours STORES as 25/24 or 1.0416667. So the DISPLAY looks like 1/1/1900 1:00 AM. SO WHAT!

Convert to Double, MyHrs = CDbl([MyDTime])*24, and truck on!

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top