How to order by datediff in WP loop?

You can handle this by define DATEDIFF() in SELECT For example:

SELECT RECID, DATEDIFF(t1.qr_enddate, NOW()) AS diffORD 
FROM `mytablw` t1 
ORDER BY diffORD ASC;

This should work but in your case I strongly recommend to use wordpress default Filter API posts orderby. This filter is applied before a post-retrieving SQL statement is executed. Use it to make custom modifications to the orderby.