Format history table