Converting Date stored as Text to Date Value

evanmer

New Member
Joined
Apr 20, 2012
Messages
14
I'm being given the format "mmm-dd-yyyy" (for ex: Jul-02-2019), however excel doesn’t interpret this text as a date value. I'd like to convert it a date value and format it as "dd/mm/yyyy" (ex: 02/07/2019); thoughts?
 

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.
Select the column with the dates, then on the data tab select text to columns > Delimited > next > clear all ceckboxes > next > select MDY (next to date) > Finish
And you should be ok
 
Upvote 0
I forgot to mention I would like to do this via VBA. I came up with the following and it worked:

Code:
FormulaR1C1 = "=DATEVALUE(LEFT(RC[-1],3)&"" ""&MID(RC[-1],5,2)&"", ""&RIGHT(RC[-1],4))"

(assumes the existing text is one cell to the right)
 
Upvote 0
Glad you figured it out & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,272
Members
452,628
Latest member
dd2

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