Views: Sort By Global Math Expression Result?
You can't sort currently by just using views but i would recommend to store
the value in the database.

Therefore create a computed field: http://drupal.org/project/computed_field
and do the logic in there to store the value in the DB. Once you have done this views will be able to sort by that.