Time Format

S.H.A.D.O.

Well-known Member
Joined
Sep 6, 2005
Messages
1,915
Hi everyone,

I would like to be able to enter a start time for example as 6.15 ( with a dot as opposed to a : ) and a finish time as 14.45. I would then like to calculate the total number of hours worked please ( the previous would equate to 8.50 hours ).

Any help will be greatly appreciated.
All the Best.
SHADO
 
not talking of the problems when starting at 23.00 and ending at 4.00

The formulas I posted will all take care of shifts which pass from one day to the next :biggrin:

INTRESTING INFO FOR "decimal=COMMA-users"
now it's working for me too, THANKS !!
found the problem
it's a translation issue
first I had changed the "." in ","
but didn't notice the "0.00" which had to be changed "0,00"
 
Upvote 0

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Thanks Erik,
Code:
RANGE FORMULA (1st cell)
C2:C4 =TRUNC(B2)-TRUNC(A2)+ROUND((B2-TRUNC(B2)-A2+TRUNC(A2))*100,0)/60+(A2>B2)*24
also works thank you.

All the Best.
SHADO
 
Upvote 0
Actually this is probably simpler and doesn't give you headaches between , and .

=MOD(TEXT(B1*100,"0\:00")-TEXT(A1*100,"0\:00"),1)*24
 
Upvote 0
Actually this is probably simpler and doesn't give you headaches between , and .

=MOD(TEXT(B1*100,"0\:00")-TEXT(A1*100,"0\:00"),1)*24
YES !
this turns out very intresting
where did you find this syntax, Barry ?
"0\:00"
I didn't see a backslash in the customformats :unsure:
 
Upvote 0
Hi Erik,

From the help files on custom number formats:

To display both text and numbers in a cell, enclose the text characters in double quotation marks (" ") or precede a single character with a backslash (\)

so I'm using the backslash to designate the : as text, using the quotes it would look like

=MOD(TEXT(B1*100,"0"":""00")-TEXT(A1*100,"0"":""00"),1)*24

...which isn't so pretty..... :(
 
Upvote 0
thank you, Barry :)
always telling to everybody "look in the helpfiles"
this time didn't do it myself :oops:, just thinking it would be available in the customlist
 
Upvote 0

Forum statistics

Threads
1,216,028
Messages
6,128,400
Members
449,448
Latest member
Andrew Slatter

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top