Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ranking Date and Time in Text Format

Status
Not open for further replies.

tamer64

IS-IT--Management
Aug 27, 2007
120
US
Hello,

I have an excel file which I have imported into an access table. There is a field Called Time_Lapsed which is in Text format. Is it possible to someway to sort (rank) these from oldest first? The fields look like this:


08 day(s), 2 hour(s), 39 minute(s).
04 day(s), 13 hour(s), 6 minute(s).
036 day(s), 22 hour(s), 11 minute(s).
03 hour(s), 8 minute(s).
03 day(s), 2 hour(s), 28 minute(s).
029 day(s), 0 minute(s).
 
Hi,

No date & time here!

Why VB Script? Why not Excel VBA? Or is this to be done in Access VBA?

No, you cannot simply sort this text.

I'd parse the data and convert to a Date/Time value.

Then sort would be simple.

 
Read the values into an array and then sort them. faq329-4836

I hope that helps.

Regards,

Mark

No trees were harmed in posting this message, however a significant number of electrons were terribly inconvenienced.

Check out my scripting solutions at
Work SMARTER not HARDER.
 
Sorry posted in wrong forum. I want to do this in MS Access query. Thank you thought I would give it try!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top