Make your life easy: reconfigure your data into 24hour time - then sorting by time is very easy: 0:00 through 23:59.
If that is impossible, then you need to have a multiple step set of conditionals in your sort where you look for 12:nn and set its position separately compared to all of the other values.
something like (oversimplified time, psuedo-code):
// Separate out morning times
if( (hour<12 and daytime='AM') or (hour==12 and daytime='PM) )
SortByHour(); // since your 12 is at the end
// of this time block
But I cannot overemphasize that converting to 24 hour time is the way to go!