Sep 13, 2006 #1 Rob7412 Technical User Joined Jan 26, 2006 Messages 31 Location US How would I query records that have a timestamp before 4:00pm today from a table
Sep 13, 2006 Thread starter #2 Rob7412 Technical User Joined Jan 26, 2006 Messages 31 Location US OOps I should have said I have a timestamp field called timecreated I need to query records that were created on todays date before 4:00pm Upvote 0 Downvote
OOps I should have said I have a timestamp field called timecreated I need to query records that were created on todays date before 4:00pm
Sep 13, 2006 1 #3 SQLDenis Programmer Joined Oct 1, 2005 Messages 5,575 Location US where Value < DATEADD(hh,16,DATEADD(dd, DATEDIFF(dd, 0, GETDATE())+0, 0)) Denis The SQL Menace SQL blog:http://sqlservercode.blogspot.com/ Personal Blog:http://otherthingsnow.blogspot.com/ Upvote 0 Downvote
where Value < DATEADD(hh,16,DATEADD(dd, DATEDIFF(dd, 0, GETDATE())+0, 0)) Denis The SQL Menace SQL blog:http://sqlservercode.blogspot.com/ Personal Blog:http://otherthingsnow.blogspot.com/
Sep 13, 2006 Thread starter #4 Rob7412 Technical User Joined Jan 26, 2006 Messages 31 Location US Thanks SQLDenis Upvote 0 Downvote
Sep 13, 2006 #5 SQLDenis Programmer Joined Oct 1, 2005 Messages 5,575 Location US No problem Denis The SQL Menace SQL blog:http://sqlservercode.blogspot.com/ Personal Blog:http://otherthingsnow.blogspot.com/ Upvote 0 Downvote
No problem Denis The SQL Menace SQL blog:http://sqlservercode.blogspot.com/ Personal Blog:http://otherthingsnow.blogspot.com/