CREATE FUNCTION [dbo].[GetSystemDate] ()
RETURNS DATETIME AS  
BEGIN 
--  declare @return datetime
--  SELECT @return = Convert(DateTime, Systemdate, 112) FROM system (NOLOCK)  
--  RETURN (@return )
  RETURN (SELECT Convert(DateTime, Systemdate, 112) FROM system WITH (NOLOCK))
END

