MINUS 6 HOURS from Current date
Posted on 2009-07-03
On this statement how can I get the records that shows the current date but with 6 hours behind. Let me give an example I am creating records 7/2/2009 but then I get into midnight so now the date is 7/3/2009 but the records still being save as 7/2/2009. Now it is 7/3/2009 I want to query all the records that happen on the 7/2/2009 even after midnight.
here what I have a statement
HAVING (dbo.BOX_TRANS.PROD_DATE = CAST(CONVERT (varchar(10), GETDATE(), 112) AS DateTime))