How to alter the value used to sort a view?
you can change query of view by this 
hook_views_query_alter(&amp;$view, &amp;$query)

This hook is a core hook of views api but you can override it in you custom moduel like MYMODULENAME_views_query_alter

In this hook you can get parameters by exposed filter's and change views query based on these parameters.