Converting troublesome date format

Sean15

Well-known Member
Joined
Jun 25, 2005
Messages
698
Office Version
  1. 2010
Platform
  1. Windows
Hello:

Say I have 2017-02-01T01:33:06Z in cell B31

How I convert 2017-02-01T01:33:06Z into 01/02/17?

I tried TEXT(B31,"mm/dd/yy") but Excel is retuning the same date format in B31

Thanks for your help.

Regards,

Sean
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Sean

Try this in a cell, it should produce valid date value that you can format as you like.

=DATEVALUE(LEFT(B31,10))
 
Upvote 0
Sean

Try this in a cell, it should produce valid date value that you can format as you like.

=DATEVALUE(LEFT(B31,10))
Since single digit day and month numbers have leading zeroes, it looks like this formula could also be used as well...

=0+LEFT(A1,10)
 
Last edited:
Upvote 0
Is that always the format your data is in - yyyy-mm-ddblahblah?
4 digit year, 2 digit month, 2 digit day (or is it day/month?)
 
Upvote 0
Is that always the format your data is in - yyyy-mm-ddblahblah?
4 digit year, 2 digit month, 2 digit day (or is it day/month?)
It is my understanding that that is the universal interpretation for that date format.
 
Upvote 0
Thanks Norie and Rick Rothstein - your formula returns the required result.

FDibbins - data's dates are formatted as 2017-02-01T01:33:06Z.

Could someone tell me why didn't formula TEXT(B31,"mm/dd/yy") return the required date or text format of required date?

Regards,

Sean
 
Upvote 0
Sean

The value in B31 isn't a date value, it's text so you can't apply a date format like 'mm/dd/yy' to it.
 
Upvote 0
Rick and Norie, thanks for the feedback, I am not familiar with that specific "date" format, that's why I asked :)
 
Upvote 0

Forum statistics

Threads
1,214,654
Messages
6,120,758
Members
448,991
Latest member
Hanakoro

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