Convert raw data to a date value

Mia Story

New Member
Joined
May 8, 2020
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hi,
Please advise how to convert a cell that includes the data along with other miscellaneous data to show just the date. I've tried a variety of formulas but those formulas just work with date characters, none include how to ignore miscellaneous characters, thought this formula would work 20190803 in AZ cell to =dateleft(AZ,4,mid(AZ,5,2),right(AZ,2)

The intention is to convert column B(date along with extra information) to Column D( just the date), see attached.
 

Attachments

  • RawData to Date.PNG
    RawData to Date.PNG
    12 KB · Views: 22

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hi Mia Story,

The third row of data looks like it has the wrong day but this formula should work:

MiaStory.xlsx
BCD
1Batchdateconvert to recognizable date
22019-03-20T12:44:56Z3/20/2019
32020-03-05T12:44:56Z3/5/2020
42020-03-01T12:44:56Z3/1/2020
Sheet1
Cell Formulas
RangeFormula
D2:D4D2=DATE(LEFT(B2,4),MID(B2,6,2),MID(B2,9,2))
 
Upvote 0
To get just the date without any time portion, this short formula will work...

=0+LEFT(B2,10)

Note, though, that you will have to format the cell to display the date format of your choice.
 
Last edited:
Upvote 0
Hi Mia Story,

The third row of data looks like it has the wrong day but this formula should work:

MiaStory.xlsx
BCD
1Batchdateconvert to recognizable date
22019-03-20T12:44:56Z3/20/2019
32020-03-05T12:44:56Z3/5/2020
42020-03-01T12:44:56Z3/1/2020
Sheet1
Cell Formulas
RangeFormula
D2:D4D2=DATE(LEFT(B2,4),MID(B2,6,2),MID(B2,9,2))


Hi Fluff, This is great!! I appreciate it so much!! Exactly what I was looking for.
 
Upvote 0
Why are you thanking Fluff... he is not involved in this thread. You should be thanking Toadstool as he is the one who posted the formula you said you are using. As an aside, I am just wondering if you tried the more compact formula that I posted in Message #3 yet?
 
Upvote 0
Why are you thanking Fluff... he is not involved in this thread. You should be thanking Toadstool as he is the one who posted the formula you said you are using. As an aside, I am just wondering if you tried the more compact formula that I posted in Message #3 yet?

It's OK Rick. Fluff always gets the praise.
;)
 
Upvote 0

Forum statistics

Threads
1,214,522
Messages
6,120,020
Members
448,939
Latest member
Leon Leenders

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