DateDiff Example

0

Please login or register to vote for this query.

(click on this box to dismiss)

Monero Meta

Q&A about the site for developers and users of the secure, private and untraceable cryptocurrency Monero

SELECT DATEDIFF(DAY, GETDATE(), GETDATE() + 1) AS DayDiff
SELECT DATEDIFF(MINUTE, GETDATE(), GETDATE() + 1) AS MinuteDiff
SELECT DATEDIFF(SECOND, GETDATE(), GETDATE() + 1) AS SecondDiff
SELECT DATEDIFF(WEEK, GETDATE(), GETDATE() + 1) AS WeekDiff
SELECT DATEDIFF(HOUR, GETDATE(), GETDATE() + 1) AS HourDiff

select datediff(hour, '2012-07-25 14:24:13.843',
'2012-07-26 13:54:46.687') as minutemaid

select 
CAST(DATEADD(MINUTE,DATEDIFF(MINUTE,'2012-07-25 14:24:13.843',
'2012-07-26 13:54:46.687'),'2011-01-01 00:00:00.000') AS TIME)

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results