Duration between two US dates in UK format...

a5972s

Board Regular
Joined
Aug 29, 2003
Messages
71
How on earth do you work out the duration in hours and minutes between two start and end times in US format using excel in UK format? My brain hurts!

I'm having to convert the dates first into UK then use the formula =(B1-A1)*1440/60.

Is there a simpler way?

05/23/2020 21:15 & 05/25/2020 08:33
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
you can try with Power Query
Rich (BB code):
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    DTL1 = Table.TransformColumnTypes(Source, {{"StartDate", type datetime}}, "en-US"),
    DTL2 = Table.TransformColumnTypes(DTL1, {{"EndDate", type datetime}}, "en-US"),
    Subtract = Table.AddColumn(DTL2, "Subtraction", each [EndDate] - [StartDate], type duration),
    Thours = Table.AddColumn(Subtract, "Total Hours", each Duration.TotalHours([Subtraction]), type number),
    Round = Table.TransformColumns(Thours,{{"Total Hours", each Number.Round(_, 0), type number}}),
    Minutes = Table.AddColumn(Round, "Minutes", each Duration.Minutes([Subtraction]), Int64.Type)
in
    Minutes
duration.png
 
Last edited:
Upvote 0
You can use Data Text to Columns

The following uses your data. It shows the result of the Data Text to Column. N.B. use Date MDY

T202005c.xlsm
ABCDEFG
5
623-05-2021:1523-05-20 21:1525-05-208:3325-05-20 8:3335.3
723-05-2021:1523-05-20 21:1525-05-208:3335.3
3a
Cell Formulas
RangeFormula
F6,C6:C7F6=D6+E6
G6G6=(F6-C6)*1440/60
G7G7=((D7+E7)-(A7+B7))*24


T202005c.xlsm
ABCDE
623-05-2021:1525-05-208:3335.3
723-05-2021:1525-05-208:3335:18
3a
Cell Formulas
RangeFormula
E6E6=((C6+D6)-(A6+B6))*24
E7E7=((C7+D7)-(A7+B7))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,547
Members
449,089
Latest member
davidcom

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