Comparing time of day when switching from 9:59 to 10:00

I have to look at data that comes in like below in a plain text file and decide where the last record was.  It seems the best way to do it is by comparing the time-of-day field (ie: Do When Field(3) > "xx:xx:xx.xxx").  The problem is, in the example below, wouldn't the first record listed actually "sort" after the second record listed (because of the 9 and the 1)?  If so, what is a better way to compare and decide where to start rather than converting all the times to seconds?  There could be several thousands of them.

1,1389,790,"09:57:26.417",1,1
1,700,101,"10:18:55.568",1,1

Thank you!
Bob SchneiderCo-OwnerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GrahamSkanRetiredCommented:
That rather depends on what sort method you are using. A sort to include the groups of digits to the left of the time could be unreliable, though, as it stands, a simple alphanumeric sort would keep the order as shown. (1,1 comes before 1,7).
You would have to pull out the time value and compare that. Do you have Excel or Access? If you have a large file, importing to one of those and sorting would be faster than manipulating each record in VB.
0
ChloesDadCommented:
Assuming that you are just sorting on the time column then if you are thinking that "10:18:55" comes before "09:57:26" then don't worry, it doesn't because the leading zero will make sure that 09 comes before 10. If however the leading zero wasn't there then yes 10 would come before 9.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bob SchneiderCo-OwnerAuthor Commented:
Super.  Thanks!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.