Sort a table by column type (text, date, time)