Convert text date to date in excel for Mac

WESTERNWALL

Board Regular
Joined
Oct 8, 2002
Messages
198
Hi
I've got a text date that I want to convert to a numerical date in Excel for Mac. I have tried some of your formulas and they don't seem to work. I can't find VBA to use. I do not have the little green triangle in the corner. Can anyone help please?
Tx
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
how is the text formatted??
what formula have you tried
what version of excel are you using ?
 
Upvote 0
Hi Etaf
It's formatted as text.
Pretty much all the Googled formulas I can find. Honestly all rubbish.
Excel for Mac Version 16.84

MrExcel Example Date format.xlsx
ABCDEFGHIJKLMN
110/15/2023 04:42:26 #VALUE!2023-10-15T00:22:30Z
210/15/2023 04:43:29 2023-10-15T00:29:45Z
310/15/2023 04:50:55 2023-10-15T00:46:03Z
410/15/2023 05:01:22 2023-10-15T01:14:41Z
510/15/2023 05:04:12 2023-10-15T01:33:40Z
610/15/2023 05:06:12 2023-10-15T01:37:48Z
710/15/2023 05:07:33 2023-10-15T01:37:54Z
810/15/2023 05:18:33 2023-10-15T02:11:08Z
910/15/2023 05:22:56 2023-10-15T02:40:29Z
1010/15/2023 05:28:27 2023-10-15T02:43:21Z
1110/15/2023 05:32:05 2023-10-15T02:44:52Z
1210/15/2023 05:32:27 2023-10-15T03:02:20Z
1310/15/2023 05:38:18 2023-10-15T03:10:37Z
14
15This is the result from column IGot rid of the "Z" by Replacing Z in "Find What field".
16How to procede from here.Got rid of "T" by replacing T with 1 space in the "Replace With" field
17
18
19
Sheet1
Cell Formulas
RangeFormula
B1B1=VALUE(A1)
 
Upvote 0
try
=DATEVALUE(LEFT(I1,10))+TIMEVALUE(MID(I1,12,8))

BUT how is 1st Jan formatted
is it 2023-01-01
OR
2023-1-1T00:00:00
in which case would need to add a search for T and Z
in the mix

Also an IFERROR()

Book3
ABCDEFGHI
110/15/2023 04:42:26 45214.015630.0156252023-10-15T00:22:30Z
210/15/2023 04:43:29 45214.020662023-10-15T00:29:45Z
310/15/2023 04:50:55 45214.031982023-10-15T00:46:03Z
410/15/2023 05:01:22 45214.051862023-10-15T01:14:41Z
510/15/2023 05:04:12 45214.065052023-10-15T01:33:40Z
610/15/2023 05:06:12 45214.067922023-10-15T01:37:48Z
710/15/2023 05:07:33 45214.067992023-10-15T01:37:54Z
810/15/2023 05:18:33 45214.091062023-10-15T02:11:08Z
910/15/2023 05:22:56 45214.111452023-10-15T02:40:29Z
1010/15/2023 05:28:27 45214.113442023-10-15T02:43:21Z
1110/15/2023 05:32:05 45214.114492023-10-15T02:44:52Z
1210/15/2023 05:32:27 45214.126622023-10-15T03:02:20Z
1310/15/2023 05:38:18 45214.132372023-10-15T03:10:37Z
14#VALUE!
15This is the result from column IGot rid of the "Z" by Replacing Z in "Find What field".
16How to procede from here.Got rid of "T" by replacing T with 1 space in the "Replace With" field
Sheet1
Cell Formulas
RangeFormula
C1C1=TIMEVALUE(MID(I1,12,8))
B1:B14B1=DATEVALUE(LEFT(I1,10))+TIMEVALUE(MID(I1,12,8))
 
Upvote 0
Hi Etaf
Thanks for your time. I was able to convert the formats in column I to the one you see in column A by deleting the letters. The formula that you have suggested to convert the date format in column I does not help to convert the one in column A. I need a formula to convert the date format in column A. I have had this kind of issue before and someone helped me with a macro that worked. I can't find the file I used it in and I can't find the solution in my profile on the messageboard. I'd appreciate a bit more patience. I appreciate your amazing assistance.
Many thanks
 
Upvote 0
where are located , and by default do you use DD/MM or MM/DD
as datevalue() may work
it wont for me as i'm UK and use DD/MM
=DATEVALUE(LEFT(A1,10))

for the time
=TIMEVALUE(RIGHT(A1,8))
so can just add that

otherwise if DD/MM

you didnt answer
BUT how is 1st Jan formatted
is it 2023-01-01

=DATEVALUE(MID(A1,4,2)&"/"&LEFT(A1,2)&"/"&MID(A1,7,4))+TIMEVALUE(RIGHT(A1,8))

Book6
AB
110/15/2023 04:42:26 45214.19613
210/15/2023 04:43:29 45214.19686
310/15/2023 04:50:55 45214.20203
410/15/2023 05:01:22 45214.20928
510/15/2023 05:04:12 45214.21125
610/15/2023 05:06:12 45214.21264
710/15/2023 05:07:33 45214.21358
810/15/2023 05:18:33 45214.22122
910/15/2023 05:22:56 45214.22426
1010/15/2023 05:28:27 45214.22809
1110/15/2023 05:32:05 45214.23061
1210/15/2023 05:32:27 45214.23087
1310/15/2023 05:38:18 45214.23493
Sheet1
Cell Formulas
RangeFormula
B1:B13B1=DATEVALUE(MID(A1,4,2)&"/"&LEFT(A1,2)&"/"&MID(A1,7,4))+TIMEVALUE(RIGHT(A1,8))
 
Upvote 0
Hi Etaf
I'll first answer your question then I try your suggestion. In the original format it's yyyy-mm-dd hh:mm:ss. When I deleted the letters, using Replace, the format in column converted to mm/dd/yyyy hh:mm:ss. The format I use is dd/mm/yyyy. Before converting the text is there a way to delete the time text on the right, then I only need to contend with converting the date? Or is that not important?
I tried the formula and it does not work.
Many thanks
 
Upvote 0
I tried the formula and it does not work.
which formula - confused as we are taking about 2 different formats in column I and Column A

in column I - its formatted as
YYYY-MM-DD
in column A - its formatted as
MM/DD/YYYY

which column are we talking about now - I or A

if you dont want the time , remove the +timevalue

then just use for column A
=DATEVALUE(MID(A1,4,2)&"/"&LEFT(A1,2)&"/"&MID(A1,7,4))

for column I
=DATEVALUE(LEFT(I1,10))
 
Upvote 1
Solution

Forum statistics

Threads
1,216,155
Messages
6,129,185
Members
449,492
Latest member
steveg127

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