HELP!! Time formula

MarkAndrews

Well-known Member
Joined
May 2, 2006
Messages
1,970
Office Version
  1. 2010
Platform
  1. Windows
Hi Guys,

I havent posted on here for many years

Im using Office 2010

I have a spreadsheet which i need to calculate the time between but i cannot for the life of me remember how to do this so i wonder if someone could kindly point me in the right direction

In Column B (EG B2) i have this data "2017-09-01 09:00:00 +0100" I need to extract the time only (09:00:00) to go in C2
In Coumn D (EG D2) I have this date "2017-09-01 11:00:00 +0100" i need to extract the time only (11:00:00) to go in E2

Then what i need to do is calculate the difference (EG E2-C2) to go in time in cell F2 and copy down the page

Any help greatly appreciated as this is driving me mad

Many thanks
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Try

Book12
ABCDEFG
1
22017-09-01 09:00:00 +01009:00:002017-09-01 11:00:00 +010011:00:002:00:00
3
4
5
Sheet1
Cell Formulas
RangeFormula
C2,E2C2=MID(B2,SEARCH("??:??:??",B2),8)+0
F2F2=E2-C2


Custom format for column C & E - "[h]:mm:ss"
 
Upvote 0
try
if you dont want to inclde any date difference

=TIMEVALUE(MID(D2,11,9)) - TIMEVALUE(MID(B2,11,9))

format cell as TIME

Book1
ABCDEF
1
22017-09-01 09:00:00 +01002017-09-01 11:00:00 +01002:00:00
Sheet1
Cell Formulas
RangeFormula
F2F2=TIMEVALUE(MID(D2,11,9)) - TIMEVALUE(MID(B2,11,9))


BUT if you want to include any of the dates if over 24hrs difference

then
=LEFT(D2,20)*1 - LEFT(B2,20)*1

Book1
ABCDEFGH
1
22017-09-01 09:00:00 +01002017-09-01 11:00:00 +01002:00:002:00:00
Sheet1
Cell Formulas
RangeFormula
F2F2=TIMEVALUE(MID(D2,11,9)) - TIMEVALUE(MID(B2,11,9))
H2H2=LEFT(D2,20)*1 - LEFT(B2,20)*1


format the cell as [H}:MM:SS
so that it shows over 24hrs
 
Upvote 0
Im using Office 2010

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
I will do, thanks for the advice :)
 
Upvote 0
try
if you dont want to inclde any date difference

=TIMEVALUE(MID(D2,11,9)) - TIMEVALUE(MID(B2,11,9))

format cell as TIME

Book1
ABCDEF
1
22017-09-01 09:00:00 +01002017-09-01 11:00:00 +01002:00:00
Sheet1
Cell Formulas
RangeFormula
F2F2=TIMEVALUE(MID(D2,11,9)) - TIMEVALUE(MID(B2,11,9))


BUT if you want to include any of the dates if over 24hrs difference

then
=LEFT(D2,20)*1 - LEFT(B2,20)*1

Book1
ABCDEFGH
1
22017-09-01 09:00:00 +01002017-09-01 11:00:00 +01002:00:002:00:00
Sheet1
Cell Formulas
RangeFormula
F2F2=TIMEVALUE(MID(D2,11,9)) - TIMEVALUE(MID(B2,11,9))
H2H2=LEFT(D2,20)*1 - LEFT(B2,20)*1


format the cell as [H}:MM:SS
so that it shows over 24hrs
This also works perfect to, many thanks
 
Upvote 0

Forum statistics

Threads
1,215,358
Messages
6,124,487
Members
449,165
Latest member
ChipDude83

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