This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

SWQL query Trap database for specific time range

I am trying to query the Orion.LM.logentry table to see what devices have not sent a snmp trap in the past 14 days. Using SWQL.

I am able to query the table not using any time restraints but this  basically  alerts us if it has not sent a trap in the past 30 days which is to long a time scale and i need to shorten it.

Would someone be able to assist me with this. I am not clued up with SQL/SWQL and only got this far with the help of google

The table I am looking at is :

SELECT TOP 10 LogEntryID, LogEntryTypeID, LogEntryLevelID, NodeID,DateTime, MessageDateTime, 
FROM Orion.OLM.LogEntry


I have tried all manner of query variations on DateTime and had no success

some examples being:

WHERE DATEDIFF(day, DateTime, GETDATE()) > 30
WHERE DateTime >= DATEADD(day,-7, GETDATE())
WHERE DateTime>= DATE_ADD(CURDATE(), INTERVAL -3 DAY)
where o DateTime> now() - INTERVAL 7 day


Thanks in advance