in reply to Hash sorting with dates and 12 hour time format.

If you have control of the hash generation, then you might want consider reformatting the time used for the key to avoid this problem. That is likely to be far easier than trying to come up with some specialized sort functions.

If, on the other hand, you are stuck with the date format that is presented, you have a harder problem (which I will leave to someone who is more of an expert on sort than I.)

  • Comment on Re: Hash sorting with dates and 12 hour time format.

Replies are listed 'Best First'.
Re^2: Hash sorting with dates and 12 hour time format.
by shift9999 (Acolyte) on Sep 15, 2009 at 21:33 UTC

    I can control date/time input to the hash so I will try formatting the date/time after the sort. The reason why this was not done already is that it will break another area of the script. I need to determine what is more beneficial.

    Thanks for your responses, I will try out a few of these ideas when I can.