Clean Dates Exported From Text Field In Oracle Database

wsnyder

Board Regular
Joined
Sep 23, 2018
Messages
223
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I ran a query in SQL Developer to get some dates from a database and exported to Excel.
The problem is the, the dates are stored in a text field and are in a wide variety of formats. Some samples:

  • June 15th 2017
  • 11/23/2016
  • 5/16/17
  • June 28th, 2017
  • 4.28.2017
Anyone ever had to cleanup something like or any suggestions how to clean it up efficiently?
There are 6,646 rows.

Thanks
-w
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
1. Determine if Oracle can export the data in a better format.

2. Use Data Text to Columns
3. Format the dates to your preference
4. Use Formula for the dates that did not convert

T202009b.xlsm
AB
2June 15th 2017Jun 15, 2017
3Nov 23, 2016Nov 23, 2016
4May 16, 2017May 16, 2017
5June 28th, 2017Jun 28, 2017
6Apr 28, 2017Apr 28, 2017
7
1e
Cell Formulas
RangeFormula
B2:B6B2=IF(ISNUMBER(A2),A2,DATE(RIGHT(A2,4),MONTH(1&LEFT(A2,3)),MID(A2,FIND(" ",A2)+1,2)))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,994
Messages
6,122,633
Members
449,092
Latest member
bsb1122

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