DECLARE @DateTimeOne DATETIME
DECLARE @DateTimeTwo DATETIME
SET @DateTimeOne = '1900-01-01 10:41:09.250'
SET @DateTimeTwo = GETDATE()
--hour = hh
--minute = mi, n
--second = ss, s
--millisecond = ms
SELECT DATEDIFF(mi,SUBSTRING(CONVERT(VARCHAR,@DateTimeOne, 121), 12, 12)
,SUBSTRING(CONVERT(VARCHAR,@DateTimeTwo, 121), 12, 12) ) MinuteDifferenceinDate
No comments:
Post a Comment