Time Field (1 Viewer)

PicassoB

Novice
Local time
Today, 14:52
Joined
May 7, 2007
Messages
63
I have a text box that I need to be able to put in available hours - in excess of 24:00 hrs - the text box is formated to short time and will not allow this - how can I achieve this please
 

boblarson

Smeghead
Local time
Today, 06:52
Joined
Jan 12, 2001
Messages
32,059
Have you tried removing the formatting? What exactly are you trying to accomplish?
 

missinglinq

AWF VIP
Local time
Today, 09:52
Joined
Jun 20, 2003
Messages
6,423
You're not talking about Time, you're talking about hours or perhaps hours and fractions of hours. You need to change it to an appropriate Number Datatype and then formatting it to look like you want.
 

PicassoB

Novice
Local time
Today, 14:52
Joined
May 7, 2007
Messages
63
Thanks guys for looking at this - I have a daily job sheet which we enter various jobs with allocated time, for each operation

Capacity field - I need to enter a number of hrs greater than 24:00 (if I have 5 operaters I would need to enter say 40:00hrs)
Booked field -a total of the hrs entered for each Job (this calculates fine)
Available field - this is a calulation of the above (this calulates fine)

the problem is entering the number of hrs in the capcity field, tried different formating but I get the wrong results - seached the forum but cannot see a similar problem
 

boblarson

Smeghead
Local time
Today, 06:52
Joined
Jan 12, 2001
Messages
32,059
You really should enter the number of hours either as a straight number (40.5) or use Text formatting and then convert it. Formatting as TIME is meant for CLOCK time, not anything over 24 hours.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 14:52
Joined
Sep 12, 2006
Messages
15,660
access actual STORES time as fractional days

so 6 hrs is 0.25 days

so you can add time, to give a total, say 1,25 days.

however if you display it as time, it just shows the 6hrs, and not the days
if you display as a date it will sohw a date in 1900 or somesuch
if you display it as a number, it will show 1.25

------------
so add the values in the way you are doing, but make the text box which stores the total hidden

now have a separate number field, set to double, fixed, 2decimal points, say and just set the control source for this to be

=myhiddentimefield * 24

so if the time adds to 1.25 days, the visible textbox will show 30.00 hours (ie 1.25 * 24)

if you want to be fancy you can change the decimal fractions of hours to minutes in a similar way - so that 30.23 hours could become 30hours 14 minutes (say)
 

Users who are viewing this thread

Top Bottom