DECLARE @StartDate SMALLDATETIME
SET @StartDate = '01/08/1985 1:35:00' -- Put Your Date of Birth & Time
SELECT DATEDIFF(yyyy, @StartDate, GETUTCDATE()) Years,
DATEDIFF(qq, @StartDate, GETUTCDATE()) AS Quarters,
DATEDIFF(mm, @StartDate, GETUTCDATE()) AS Months,
DATEDIFF(ww, @StartDate, GETUTCDATE()) AS Weeks,
DATEDIFF(dd, @StartDate, GETUTCDATE()) AS [Days],
DATEDIFF(hh, @StartDate, GETUTCDATE()) AS [Hours],
DATEDIFF(mi, @StartDate, GETUTCDATE()) AS [Minutes],
DATEDIFF(ss, @StartDate, GETUTCDATE()) AS [Seconds]
SET @StartDate = '01/08/1985 1:35:00' -- Put Your Date of Birth & Time
SELECT DATEDIFF(yyyy, @StartDate, GETUTCDATE()) Years,
DATEDIFF(qq, @StartDate, GETUTCDATE()) AS Quarters,
DATEDIFF(mm, @StartDate, GETUTCDATE()) AS Months,
DATEDIFF(ww, @StartDate, GETUTCDATE()) AS Weeks,
DATEDIFF(dd, @StartDate, GETUTCDATE()) AS [Days],
DATEDIFF(hh, @StartDate, GETUTCDATE()) AS [Hours],
DATEDIFF(mi, @StartDate, GETUTCDATE()) AS [Minutes],
DATEDIFF(ss, @StartDate, GETUTCDATE()) AS [Seconds]
No comments:
Post a Comment