How convert Text to Date & Time

shlomek12

Board Regular
Joined
Aug 2, 2011
Messages
242
My text is the following format :

20/4/2021 16:46
20/4/2021 09:40
20/4/2021 07:52
20/4/2021 16:36
20/4/2021 14:25
20/4/2021 14:28
20/4/2021 14:31
20/4/2021 17:18

The middle number "4" is the Month

I need to covert this as Dates (MM/DD/YYYY) and Time (06:46 AM New York Time Zone)
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Try Data Data Text to Column date option dmy
Format to your preference

Date and Time 2021.xlsm
ABCD
1
220-04-21 16:46Apr 20, 202116:46:00Apr 20, 2021 16:46
320-04-21 09:40Apr 20, 202109:40:00Apr 20, 2021 09:40
420-04-21 07:52Apr 20, 202107:52:00Apr 20, 2021 07:52
520-04-21 16:36Apr 20, 202116:36:00Apr 20, 2021 16:36
620-04-21 14:25Apr 20, 202114:25:00Apr 20, 2021 14:25
720-04-21 14:28Apr 20, 202114:28:00Apr 20, 2021 14:28
820-04-21 14:31Apr 20, 202114:31:00Apr 20, 2021 14:31
920-04-21 17:18Apr 20, 202117:18:00Apr 20, 2021 17:18
8d
Cell Formulas
RangeFormula
D2:D9D2=B2+C2
 
Upvote 0
First, Thanks for your quick response

I did not tried since I want to do it in a Formula

Can it be done in a Formula?
 
Upvote 0
Upvote 0
Solution
Hi,

See my first 4 row samples, for single/double digit month or days:

Book3.xlsx
AB
120/4/2021 16:4604/20/2021 04:46 PM
220/12/2021 09:4012/20/2021 09:40 AM
32/12/2021 07:5212/02/2021 07:52 AM
420/12/2021 16:3612/20/2021 04:36 PM
520/4/2021 14:2504/20/2021 02:25 PM
620/4/2021 14:2804/20/2021 02:28 PM
720/4/2021 14:3104/20/2021 02:31 PM
820/4/2021 17:1804/20/2021 05:18 PM
Sheet927
Cell Formulas
RangeFormula
B1:B8B1=MID(SUBSTITUTE(A1,"/","/"&LEFT(A1,FIND("/",A1)),2),FIND("/",A1)+1,99)+0


Thank you very much
 
Upvote 0
You're welcome, thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,624
Messages
6,120,591
Members
448,973
Latest member
ksonnia

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