Change date format

mIkeChchNZ

New Member
Joined
Jul 13, 2024
Messages
7
Office Version
  1. 365
Platform
  1. Windows
I have a report that returns the date and time as Friday, July 12, 2024 07:08:00 p.m.

Is there a formula or macro I can use to change this to display as d/mm/yyy h:mm

Friday, July 12, 2024 07:08:00 p.m.
 
Try this. After inserting the formula, you'll see numbers. That's just how Excel stores dates, but you can format cell -> custom.
Book1
AB
1Textd/mm/yyy h:mm
2Friday, July 12, 2024 07:08:00 p.m.12/07/2024 19:08
Sheet2
Cell Formulas
RangeFormula
B2B2=--TEXTAFTER(SUBSTITUTE(A2,".","")," ")

I get a #VALUE error
 
Upvote 0

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
*Should TRIM first*
Excel Formula:
=--TEXTAFTER(SUBSTITUTE(TRIM(A2),".","")," ")
 
Upvote 0
I believe Cubist default date is US and I am wondering if that it why it doesn't work for you. My default is d/mm/yyyy and it doesn't work for me either.
Does this work:
Excel Formula:
=--TEXTJOIN(" ",TRUE,CHOOSECOLS(TEXTSPLIT(SUBSTITUTE(SUBSTITUTE(A2,",",""),".","")," "),3,2,4,5,6))
 
Upvote 0
Solution
I believe Cubist default date is US and I am wondering if that it why it doesn't work for you. My default is d/mm/yyyy and it doesn't work for me either.
Does this work:
Excel Formula:
=--TEXTJOIN(" ",TRUE,CHOOSECOLS(TEXTSPLIT(SUBSTITUTE(SUBSTITUTE(A2,",",""),".","")," "),3,2,4,5,6))
Looks like it's working. Really appreciate everyone's help!
 
Upvote 0
I would think that using the full month name, it'd picked it up universally e.g. July. Now, I know the order does matter.
Its harder for you to pick up since the default is generally US format so it will work for you, and give you no reason to think it won't work for others.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,399
Latest member
alchavar

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