Date Formula

SOLTEC

Board Regular
Joined
Feb 11, 2015
Messages
195
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
My bank sends me statements with the date format like this

Thu, Jan 04 2024 and Excel won't convert it.


Is there a formula to allow me to convert this to either a Long date Thu, Jan. 04, 2024, OR
to convert it to short date 01/04/2024. Thank you in advance.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
For a value in cell A1, you can use a formula like this to convert it to a valid date value:
Excel Formula:
=DATEVALUE(MID(A1,6,6) & ", " & RIGHT(A1,4))
and then you can apply any date format you want to it.
 
Upvote 0
=--SUBSTITUTE(A1," ",", ",2)

Format in the date format you want.
 
Upvote 0
=--SUBSTITUTE(A1," ",", ",2)

Format in the date format you want.
Scott,

That doesn't seem to work on his example of "Thu, Jan 04 2024".

Note that if you remove the "--" just to see what the formula part returns, you get:
Excel Formula:
Thu, Jan, 04 2024
which will not convert to a valid date by adding "--" in front of it.
 
Upvote 0
Joe, that gave me a long number and when I formatted the cell to a date gave me my short date. Thank you.
 

Attachments

  • Excel Date Format with Formula.png
    Excel Date Format with Formula.png
    60.2 KB · Views: 3
Upvote 0
Joe, that gave me a long number and when I formatted the cell to a date gave me my short date. Thank you.
Yep, that is exactly how Excel all dates (as long numbers), specifically the number of days since 1/0/1900.
You can see this by entering any valid date in Excel, and then changing the format of the cell to "General" or "Number".
Then you will see the date as Excel actually sees it.

So all dates really are in Excel are numbers with special date formatting applied to them.
That is why you can subtract two dates and it will return the number of days between them.
 
Upvote 0
You have a solution since your system has Regional Settings of mm-dd--yyyy.

Systems that have Regional Settings with International format i.e. dd-mm-yy may require the following.

Please confirm if E1 works correctly on your system.

T202401a.xlsm
ADE
1Thu, Jan 04 2024 04-Jan-202404-Jan-2024
2
3a
Cell Formulas
RangeFormula
D1D1=--CONCAT(INDEX(TEXTSPLIT(A1,{" ",","},,1),{3,2,4}))
E1E1=LET(t,TEXTSPLIT(A1,{" ",","},,1),DATE(INDEX(t,4),MONTH(INDEX(t,2)&"-1"),INDEX(t,3)))
 
Upvote 0

Forum statistics

Threads
1,215,103
Messages
6,123,112
Members
449,096
Latest member
provoking

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