Concatenate Date & Time

BrianM

Well-known Member
Joined
Jan 15, 2003
Messages
768
Office Version
  1. 2016
Platform
  1. Windows
What is the simplest way to concatenate Date A1 = 04/22/04 with B1 = 18:09:50 so that the result is 04/22/04 18:09:50


Thanks,
Brian
 
I have a slight variation to the question. I have separate fields for date and time (registration_date, registration_time) and similarly separate fields for receipt_date and receipt_time). I want to calculate the elapsed time between registration and receipt. Registration date/time is 1 Oct 2019 at 10:00, and the receipt time is 2 Oct 2019 at 11:00. So I want a formula to calculate and show me the elapsed interval in hours:minutes, so for my example I expecting to see an elapsed time of 25:00 (25 hours:00 minutes). I have tried combining the individual cells into one value then subtracting the two, but all i see is 00:00. However if both receipt_date and registration_date are the same, the formula works. It does not work if the dates are not the same. Is there any formula that can help in calculating elapsed date/time?
 
Upvote 0

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Welcome to the MrExcel board!
Try a formula like this
=(C2+D2)-(A2+B2)
where C & D are receipt and A & B are registration
.. and apply a custom format to that result cell of [hh]:mm
 
Last edited:
Upvote 0
Welcome to the MrExcel board!
Try a formula like this
=(C2+D2)-(A2+B2)
where C & D are receipt and A & B are registration
.. and apply a custom format to that result cell of [hh]:mm
Thank you Peter - that worked!! For my own "education" what do the square brackets around the [hh] actually mean/enforce?
 
Upvote 0
Hello,

Whenever you are dealing with hours ...using [h]:mm format allows you to display number of hours greater than 24 hours ...

Hope this will help
 
Upvote 0
.. what do the square brackets around the [hh] actually mean/enforce?
For the example you gave, if you remove the [] from the custom format, the result would show as 01:00 instead of 25:00
Try it and see. :)
 
Upvote 0
For the example you gave, if you remove the [] from the custom format, the result would show as 01:00 instead of 25:00
Try it and see. :)
Thank you Peter. Exactly as you suggested. It now all makes sense. Thank you for your quick response and assistance; much appreciated.:)
 
Upvote 0

Forum statistics

Threads
1,215,430
Messages
6,124,847
Members
449,194
Latest member
HellScout

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