Get day from a datetime value : Update function « Trigger « SQL Server / T-SQL Tutorial






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

drop FUNCTION DayOnly;
GO








22.13.Update function
22.13.1.The UPDATE() Function
22.13.2.Is UPDATing a certain column
22.13.3.Get day from a datetime value