Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Date and Time help

Author  Topic 

Chris_Kelley
Posting Yak Master

114 Posts

Posted - 2014-08-25 : 12:23:05
c

Chris_Kelley
Posting Yak Master

114 Posts

Posted - 2014-08-25 : 12:30:59
c
Go to Top of Page

Chris_Kelley
Posting Yak Master

114 Posts

Posted - 2014-08-25 : 12:40:26
c
Go to Top of Page

Chris_Kelley
Posting Yak Master

114 Posts

Posted - 2014-08-25 : 12:43:52
c
Go to Top of Page

bitsmed
Aged Yak Warrior

545 Posts

Posted - 2014-08-25 : 13:25:41
Try this:
SELECT *
FROM NOTE
WHERE NOTE_DATE >= DATEADD(MINUTE, -30, GETDATE())
AND NOTE_DATE < GETDATE()
AND NOTE_DATE > CAST(GETDATE() AS DATE)

quote:
Originally posted by Chris_Kelley

SELECT * FROM NOTE WITH(NOLOCK)
WHERE
NOTE_DATE > DATEADD(MINUTE, -30, GETDATE())
AND NOTE_DATE >= DATEADD(DAY, -1, GETDATE())
Go to Top of Page

Chris_Kelley
Posting Yak Master

114 Posts

Posted - 2014-08-25 : 14:12:46
c
Go to Top of Page
   

- Advertisement -