>Did you mean to say "you cannot issue SET DATEFIRST from within a UDF"?. BOL in CREATE FUNCTION Remarks section states "Statements not in this list are not allowed in the body of a function:" and SET statements aren't in the above mentioned list.
Yes. I meant to say "can't." I was interrupted in the middle of typing my reply.
-Mike