Sep 13, 2006 #1 Rob7412 Technical User Jan 26, 2006 31 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 Jan 26, 2006 31 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 Oct 1, 2005 5,575 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 Jan 26, 2006 31 US Thanks SQLDenis Upvote 0 Downvote
Sep 13, 2006 #5 SQLDenis Programmer Oct 1, 2005 5,575 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/