sorting on a date format - maybe?

  • Thread starter Thread starter dbh
  • Start date Start date
D

dbh

I'm importing a text file with many columns of data that has been
generated by an external program. I have over 4000 rows, of which
several columns have a date format like this:

Fri Nov 5 09:41:36 2004

Somehow I need to be able to sort this column sanely, such that it can
be sorted
by the date.

I think that Excel needs to understand that a cell has a date (and
time?) in it, in order to convert it to a value that can be sorted.

I have looked at FAQs and tips, and I just can't seem to understand how
I might be able to do this.

I really need to be able to sort the whole file based on a sanely
ordered date column.

Any help would be appreciated.

Thanks,

deb
 
Just by the date???

How about using a helper column and using a formula like:

=DATEVALUE(MID(TRIM(A1),5,SEARCH(" ",TRIM(A1),10)-5)&", "&RIGHT(TRIM(A1),4))
(Format as date: mm/dd/yyyy)

If you want date and time, how about:

=DATEVALUE(MID(TRIM(A1),5,SEARCH(" ",TRIM(A1),10)-5)&", "&RIGHT(TRIM(A1),4))
+TIMEVALUE(MID(TRIM(A1),SEARCH(" ",TRIM(A1),10)+1,8))

(format as date & time: mm/dd/yyyy hh:mm:ss)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Remove date format? 3
UNABLE TO SORT DATE 1
Sorting dates in the format Jan Feb Mar Apr ... ??? 4
Date Formatting 2
AUtofiltering dates 1
sort date 2
sorting 2
Automatically sorting columns by date 1

Back
Top