convert to a valid date and time

ExcelNewbie2020

Active Member
Joined
Dec 3, 2020
Messages
289
Office Version
  1. 365
Platform
  1. Windows
I have these date and time formats. I tried different date and time function but are not working. How can I convert these to become a valid date and time format (mm-dd-yyyy hh:mm:ss) ..many thanks


10-28-2021 | 08:57:12​
10-28-2021 | 08:51:14​
10-28-2021 | 08:51:14​
10-28-2021 | 08:41:34​
10-28-2021 | 08:41:34​
10-28-2021 | 08:22:55​
10-28-2021 | 08:22:55​
10-28-2021 | 08:21:34​
10-28-2021 | 08:21:34​
10-28-2021 | 08:20:43​
10-28-2021 | 08:20:43​
10-28-2021 | 08:20:28​
10-28-2021 | 08:20:28​
10-28-2021 | 08:10:04​
10-28-2021 | 08:10:04​
10-28-2021 | 08:07:55​
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
if your values in column A then try this in column B
=TRIM(REPLACE(A1,12,1,""))
 
Upvote 0
Is your local date format d/m/y or m/d/y?
 
Upvote 0
Data in A2. In B2
Excel Formula:
=DATE(MID(A2,7,4), LEFT(A2,2),MID(A2,4,2))+VALUE(MID(A2,FIND("| ",A2)+2,8))
Format the cell B2 for dd/mm/yyyy hh:mm:ss
Date and month should have 2 digits . Otherwise we have to change formula.
Eg For Sep it should be 09
 
Upvote 0
Solution
try this
=CONCATENATE(MID(A1,4,2),"/",LEFT(A1,2),"/",MID(A1,7,4)," ",MID(A1,14,8))+0
 
Upvote 0
I have these date and time formats. I tried different date and time function but are not working. How can I convert these to become a valid date and time format (mm-dd-yyyy hh:mm:ss) ..many thanks


10-28-2021 | 08:57:12​
10-28-2021 | 08:51:14​
10-28-2021 | 08:51:14​
10-28-2021 | 08:41:34​
10-28-2021 | 08:41:34​
10-28-2021 | 08:22:55​
10-28-2021 | 08:22:55​
10-28-2021 | 08:21:34​
10-28-2021 | 08:21:34​
10-28-2021 | 08:20:43​
10-28-2021 | 08:20:43​
10-28-2021 | 08:20:28​
10-28-2021 | 08:20:28​
10-28-2021 | 08:10:04​
10-28-2021 | 08:10:04​
10-28-2021 | 08:07:55​

Try this :
Book1
AB
110-28-2021 | 08:57:1210/28/2021 08:57:12
210-28-2021 | 08:51:1410/28/2021 08:51:14
310-28-2021 | 08:51:1410/28/2021 08:51:14
410-28-2021 | 08:41:3410/28/2021 08:41:34
510-28-2021 | 08:41:3410/28/2021 08:41:34
610-28-2021 | 08:22:5510/28/2021 08:22:55
710-28-2021 | 08:22:5510/28/2021 08:22:55
810-28-2021 | 08:21:3410/28/2021 08:21:34
910-28-2021 | 08:21:3410/28/2021 08:21:34
1010-28-2021 | 08:20:4310/28/2021 08:20:43
1110-28-2021 | 08:20:4310/28/2021 08:20:43
1210-28-2021 | 08:20:2810/28/2021 08:20:28
1310-28-2021 | 08:20:2810/28/2021 08:20:28
1410-28-2021 | 08:10:0410/28/2021 08:10:04
1510-28-2021 | 08:10:0410/28/2021 08:10:04
1610-28-2021 | 08:07:5510/28/2021 08:07:55
Sheet1
Cell Formulas
RangeFormula
B1:B16B1=CONCATENATE(MID(A1,4,2),"/",LEFT(A1,2),"/",MID(A1,7,4)," ",MID(A1,14,8))+0
 
Upvote 0

Forum statistics

Threads
1,214,601
Messages
6,120,465
Members
448,965
Latest member
grijken

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