I would like to be able to do is query a specific IP record and see if its 'DateTime' fell within the last 15 minutes. Seems easy enough, but we're having a tough time figuring out SQL syntax for making a decision on minutes of a timestamp in the 'DateTime' column.
I am trying create a query that returns data for the last 15 minutes. This is what i have for the syntax, but its returning no data. Can someone show me what i'm doing wrong.
SELECT COUNT(*) FROM VCSResults WHERE VCSIP = '123#123#3#149' AND datetime>dateadd(n,-15,getdate())
I am trying create a query that returns data for the last 15 minutes. This is what i have for the syntax, but its returning no data. Can someone show me what i'm doing wrong.
SELECT COUNT(*) FROM VCSResults WHERE VCSIP = '123#123#3#149' AND datetime>dateadd(n,-15,getdate())