SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Date and Time help
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Chris_Kelley
Posting Yak Master

114 Posts

Posted - 08/25/2014 :  12:23:05  Show Profile  Reply with Quote
c

Edited by - Chris_Kelley on 11/11/2014 19:31:07

Chris_Kelley
Posting Yak Master

114 Posts

Posted - 08/25/2014 :  12:30:59  Show Profile  Reply with Quote
c

Edited by - Chris_Kelley on 11/11/2014 19:31:15
Go to Top of Page

Chris_Kelley
Posting Yak Master

114 Posts

Posted - 08/25/2014 :  12:40:26  Show Profile  Reply with Quote
c

Edited by - Chris_Kelley on 11/11/2014 19:31:22
Go to Top of Page

Chris_Kelley
Posting Yak Master

114 Posts

Posted - 08/25/2014 :  12:43:52  Show Profile  Reply with Quote
c

Edited by - Chris_Kelley on 11/11/2014 19:31:29
Go to Top of Page

bitsmed
Constraint Violating Yak Guru

433 Posts

Posted - 08/25/2014 :  13:25:41  Show Profile  Reply with Quote
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 - 08/25/2014 :  14:12:46  Show Profile  Reply with Quote
c

Edited by - Chris_Kelley on 11/11/2014 19:31:37
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000