Function buildDateSortCriterion

Utility function that builds a valid SortByDate criterion.