0

I have a large spreadsheet that contains, among other things, date entries in the form of:

Fri, 03 May 2013 07:04:46 GMT

I haven't been able to find a way, within Excel proper, to manipulate this down to a date object it recognizes. The problem is, I don't extract the spreadsheet or have any control over how this data is provided, and there are a LOT of entries -- to many to manually change them. Further, while my first thought is to simply crank out a Perl script to roll through and do it for me, this won't do because I'm just prototyping a process that will be handed off to someone that wouldn't know Perl from Pearl. It needs to be something doable only in Excel, and other than sorting and basic equations and such, I'm pretty much an excel noob.

My require is simply that I need to be able to sort the column contain these values as a date.

Thanks!

4

2 回答 2

2

You can use =LEFT, =MID and =RIGHT to extract the different parts of the string, and manipulate them further. The string format isn't unambiguous from your example, but I'm assuming that it's 3-char weekday, dd mmm yyyy date, and hh:mm:ss time.

If your data is in column A:

=LEFT(A1, 3)

returns Fri

=MID(A1, 6, 11)

returns 03 May 2013, and =VALUE() on that returns the date serial number for 3 May 2013.

于 2013-07-16T13:38:41.137 回答
2

If there are specifically three characters for the month, then you could use:

=DATEVALUE(MID(A1,6,11))+TIMEVALUE(MID(A1,18,8))

Format the Cell to a Date, using something like dd/mm/yyyy hh:mm:ss if you want to confirm that the time is correctly interpreted.

If you don't need the time then just omit the +TIMEVALUE().

于 2013-07-16T14:01:37.937 回答