Converting text to date and time, then calculating the minutes between each

ExcelBeginner34

New Member
Joined
Mar 2, 2019
Messages
41
Office Version
  1. 2016
Platform
  1. Windows
Hi,

Hoping to get some help. A colleague of mine has sent me the attached file. The have asked if there is an easy was to work out the difference in time between col A and B. From what I can tell, the data is just entered as text as it is left aligned. I assume that I need some way to convert this text to a date and time format then subtract the earlier date/time from the latter to work out the difference. I just can't figure out how to do this!

1603195128918.png


Any help would be very much appreciated.

Best regards

Iain
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
to check if its a date - change the format to general and see if you get a number
if not, i suspect the . maybe causing a text
then click on column a and b to select both columns , then use a FIND/REPLACE
and find a dot . and replace with a /
now it should all turn into dates & times
 
Upvote 0
use Power Query
it should change format of both columns to datetime format the subtract Endzeit / Anfangszeit, I mean select Endzeit then with Ctrl key select Anfangszeit then from the ribbon: Add Column-Standard-Subtract
 
Upvote 0
to check if its a date - change the format to general and see if you get a number
if not, i suspect the . maybe causing a text
then click on column a and b to select both columns , then use a FIND/REPLACE
and find a dot . and replace with a /
now it should all turn into dates & times
Thanks for your help, that's worked a treat. Much appreciated.
 
Upvote 0
What are your regional settings for dates?
What does a normal date look like?
What have your tried?
It would help if you posted your data with Xl2BB.

T202010b.xlsm
ABC
1StartEndDifference
201.02.2020 00:0801.02.2020 00:1800:10:00
301.02.2020 00:0802.02.2020 00:1824:10:00
2b
Cell Formulas
RangeFormula
C2:C3C2=SUBSTITUTE(B2,".","-")-SUBSTITUTE(A2,".","-")
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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