Reputation: 710
I cannot seem to get the date from this format in excel:
Mon Jun 06 09:33:41 2016
I've tried date() and datevalue() and neither seem to work.
I do not need the time stamp, just month, day and year. I've also tried removing the time and name of day (ie. Mon) and converting Jun 06 2016. This is also not working for me.
Upvotes: 0
Views: 1312
Reputation: 617
Upvotes: 0
Reputation: 152660
The problem is the Mon
removing that we can get the correct format:
=DATEVALUE(MID(A1, FIND(" ",A1),LEN(A1)))+ TIMEVALUE(MID(A1, FIND(" ",A1),LEN(A1)))
Then format it as you like.
If you only want the date:
=DATEVALUE(MID(A1, FIND(" ",A1),LEN(A1)))
Upvotes: 3
Reputation:
Use MID function and REPLACE function to parse the text then the DATEVALUE function to covert the text-that-looks-like-a-date.
=DATEVALUE(REPLACE(MID(A1,5,99),7,9,","))
The result will be numeric (e.g. 42,527). Format the cell as a date.
Upvotes: 4