create FUNCTION DayOnly(@Date datetime) RETURNS varchar(12) WITH SCHEMABINDING AS BEGIN RETURN CONVERT(varchar(12), @Date, 101) END GO drop FUNCTION DayOnly; GO