Convert 15 Oct 2019 16:23:28 GMT+00:00 to 15/10/2019

kachaloo

New Member
Joined
Jan 18, 2011
Messages
22
Office Version
  1. 2016
Platform
  1. Windows
Hello
I have downloaded a report and the date in the above format stored as text.
I would like to change it 15/10/2019 to create a Pivot table.
I have tried datevalve, format the cell to date but no joy.
Any pointer please.
thank you.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
How about
varios 12abr2020.xlsm
AB
1
215 Oct 2019 16:23:28 GMT+00:0015/10/2019
Hoja4
Cell Formulas
RangeFormula
B2B2=LEFT(A2,11)+0
 
Upvote 0
If you wanted to do it "in place" (ie in the column the text data already is) you could run this one-line macro or manually do a Text to Columns (can provide further instructions for the manual process if required). Just need to ensure this macro is pointed at the correct column. I have assumed column A.

VBA Code:
Sub ConvertToDate()
    Columns("A").TextToColumns DataType:=xlFixedWidth, FieldInfo:=Array(Array(0, 4), Array(11, 9))
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,161
Members
453,021
Latest member
Justyna P

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