sf_date(,6,10)

CREATE FUNCTION [dbo].[SF_DATE]( @pd_date DATETIME, @pn_hours SMALLINT, @pn_mins SMALLINT) RETURNS datetime
AS
BEGIN
IF ( Year(@pd_date) = ‘1900’ ) RETURN( NULL )
RETURN( CONVERT(datetime , Convert(VarChar(10),@pd_date, 103 ) + ‘ ‘ + Convert(varchar,@pn_hours) + ‘:’ + Convert(varchar,@pn_mins), 103 ) )
END