Christopher is absolutely right. Depending on the datatype you need to create an expression.
in the dw painter you would doubleclick a column in the sort painter (rows>sort...), then enter the expression. For dynamic sort you need to put the expression together:
For example:
SetSort( if (isnull(mydate), date('2030-01-01'),mydate) A")
or
SetSort( if (isnull(mydate), date('1900-01-01'),mydate) D")