SQL_LogoSayısalSaati_Normal Saate Çevirme_LG_INTTOTIME
SELECT DBO.LG_INTTOTIME('221718541') --------------------------- CREATE FUNCTION sayıyısaateçevir (@LDATE INT) RETURNS VARCHAR(12) AS BEGIN DECLARE @TIME DATETIME, @HH INT, @MM INT, @SS INT, @TIMESTR VARCHAR(12), @RETSTR VARCHAR(12) SELECT @HH = (@LDATE-(@LDATE%65536))/65536/256 SELECT @MM = ((@LDATE-(@LDATE%65536))/65536-((@LDATE-(@LDATE%65536))/65536/256)*256) SELECT @SS = (((@LDATE%65536)-((@LDATE%65536)%256))/256) SELECT @TIMESTR = CAST(@HH AS VARCHAR(2))+':'+ CAST(@MM AS VARCHAR(2))+':'+ CAST(@SS AS VARCHAR(2)) SELECT @TIME = CONVERT(DATETIME,@TIMESTR,101) SELECT @RETSTR = CONVERT(VARCHAR,@TIME,108) RETURN(@RETSTR) END
0 Yorum