Changed date format to mysql datetime