you should check that you have read the Time values in as recognized time value. Either assure that the default format matches this time format code or foce QV to read the value as time value while loading, maybe like
time#(TIMEFIELD,'hh:mm tt') as Time,
Please look into the Help for time#() function and the format codes. If you want to format the time values differently, please look also into time() function.
The sorting should not be a problem with recognized time values with its numerical representation then.
You may be loading from a timestamp, and doing something like this:
time(MyTimestamp) as MyTime
It looks perfectly logical, but it also doesn't work, as time() is just a formatting function. The underlying value is STILL a timestamp, and contains hidden date information. If you sort numerically, your data would then be in "random" order because the sort is including the hidden date. If that's what's going on, you'd want to load it more like this:
time(frac(MyTimestamp)) as MyTime
The frac() function will remove the date portion, leaving you with only a time, or more technically just the numeric equivalent of a time. The time() function then formats that number as an actual time field. A numeric sort will then work properly.