Thread: Add Time Q
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] alanglloyd@aol.com is offline
external usenet poster
 
Posts: 38
Default Add Time Q

On Jun 20, 9:26*am, Seanie wrote:
Progress of sorts, the formula below will show me the number of
instances that Clocks occurred between 11am-12pm, so I can equate
1=60mins, but it can't handle partial hours, so if some one was
clocked in at 11:15am, it should return 45mins, but doesn't it returns
1 (60 mins)


Dates & Times are essentially handled by Excel as whole numbers for
the day (counted from a datum about 1900) and decimals for the
fraction of the day.

Differences between date-time values will also be a date-time value.
So time diferences will be a fraction of a day.

The minutes of the hour for any one date-time value is obtained by
MINUTE(), similarly the hour of the day for any one date-time value is
obtained by HOUR(). Note that these values are _of the hour_ or _of
the day, NOT the elapsed time unless they are the differences of two
values in one hour (for MINUTE()), or of two values in one day (for
HOUR()).

To demonstrate put the following in row 3 of a spreadsheet :

A3 11:15
B3 12:00
C3 =B3-A3
D3 =MINUTE(C3)

then put

F2 =5.8
G2 Hourly Rate
E3 =D3+(HOUR(C3)*60)
F3 =($F$2*E3)/60

A3 is start time (note the colon)
B3 is finish time
C3 is the time difference
D3 is the minute of time difference (of the hour of the integer of the
time difference)
E3 is the total minutes difference of the time difference

.... and what you might pay ...

F2 is hourly rate
F3 is pay amount

Then you can play & vary the times & understand how to handle time
difference values.

Alan Lloyd