updated date sort

works in sql workbench but not in PHP - still an issue