design, sort table by date

some design changes
fixed table sort by date and date format in the DB